1👍
✅
.get_or_create(…)
[Django-doc] returns a 2-tuple with the object created/retrieved as first item, and a boolean that is True
in case the object was created as second. You thus unpack these with:
video, __ = Video.objects.get_or_create(serial_number=serial_number,
Source:stackexchange.com