Changes between Initial Version and Version 1 of Ticket #27070, comment 6


Ignore:
Timestamp:
Aug 16, 2016, 2:03:51 PM (8 years ago)
Author:
Flavio Curella

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #27070, comment 6

    initial v1  
    1 @charettes
     1Replying to [comment:5 charettes]:
     2> > There currently isn't any way to use `Q` objects when checking for existence in `get_or_create` and `update_or_create`.
     3>
     4> Isn't `filter(Q(first_name='Bryan') | Q(first_name='Bruce')).get_or_create({'last_name': 'Harrison'})` working?
     5>
    26
    37O_O It didn't occur to me that it could be done that way. Seems to work exactly as I'd expect.
Back to Top