Changes between Initial Version and Version 1 of Ticket #23449, comment 4


Ignore:
Timestamp:
Oct 7, 2014, 2:32:03 PM (10 years ago)
Author:
Anubhav Joshi

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #23449, comment 4

    initial v1  
    55- Secondly, I don't think that bulk_create problem occurs because of that in the example you have given, its because `null=True` is not set so a FK value is required there and you haven't specified one.(correct me if I am wrong, p.s. the check for id runs only when FK object is not None.)
    66- Thirdly, it is consistent with [https://code.djangoproject.com/changeset/3190abcd75b1fcd660353da4001885ef82cbc596/ 3190abc] — a fix for the same problem for reverse one-to-one relations.
     7
     8
     9I think that there is nothing wrong with the current state as the test runs only when object provided is not None, so when `null=False` and no FK object is provided, things should work correctly if that's the problem here.
     10IMO if an object is provided, then irrespective of `null=True`, it should be checked if that object is saved or not.
Back to Top