-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introducing IommiModel #325
base: master
Are you sure you want to change the base?
Conversation
@jlubcke thinks there is a better name for |
We should add this to def __repr__(self):
return f'<{self.__class__.__name__} pk={self.pk}>' and where did we stand on making IommiModel an empty class and have the essential functionality in a mixin? We talked about it at least... |
Other name suggestions for
|
return result | ||
|
||
def save(self, force_insert=False, force_update=False, using=None, update_fields=None): | ||
if self.pk is not None and not force_insert: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we only do this if the user has not passed any other update_fields
. (Or should we assert there are none? Or verify that the passed is a subset of what we expect?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Subset feels more logical. But it's also a bit weird... Maybe warn if update_fields is passed at all? My gut feeling is that you should pick a method, but also that you want it to be possible to slowly migrate to this system.
No description provided.