Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Item.objects.filter(serial__in=license_ids).update(renewable=not F('renewable'))
- from django.db.models import Case, Value, When
- Item.objects.filter(serial__in=license_ids
- ).update(renewable=Case(
- When(renewable=True, then=Value(False)),
- default=Value(True))
- )
- )
Add Comment
Please, Sign In to add comment