swisscom / cleanerversion

CleanerVersion adds a versioning/historizing layer to your relational DB which implements a "Slowly Changing Dimensions Type 2" behavior
Apache License 2.0
136 stars 53 forks source link

Self.pk on Model.save() method #135

Open gabn88 opened 7 years ago

gabn88 commented 7 years ago

I often use:

if not self.id:
    created=True
else:
    created=False

to determine if the instance is newly created or just modified. However by using Versionable, this doesn't work anymore, because it sets the id to an UUID automatically.

It would be nice if this could be fixed.