Changes between Initial Version and Version 1 of Ticket #27070, comment 6
- Timestamp:
- Aug 16, 2016, 2:03:51 PM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #27070, comment 6
initial v1 1 @charettes 1 Replying 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 > 2 6 3 7 O_O It didn't occur to me that it could be done that way. Seems to work exactly as I'd expect.