Jaymon / prom

A PostgreSQL or SQLite orm for Python
MIT License
22 stars 4 forks source link

prom.model.Orm should not fail if no pk #91

Closed Jaymon closed 4 years ago

Jaymon commented 4 years ago

There is a line in the .save() method:

pk = None
if self.schema.pk.name not in self.modified_fields:
    pk = self.pk

but .save() shouldn't fail if there is no primary key, it should just insert