1👍
✅
You should override the save of the Round
model to ensure that the favorite
submission exists and if not save it.
If you try to save the Round
model when the favorite
doesn’t exist ins Submission
, there will be an exception thrown, most likely Submission.DoesNotExist
. So you can use the exception to save and try again.
Source:stackexchange.com