track prior organization_id by base model prior values tore

Also fix bug where unified pointers were counted in
the prior values store
This commit is contained in:
AlanCoding
2018-05-18 07:52:19 -04:00
parent 967624c576
commit b7e9bda6cf
3 changed files with 6 additions and 12 deletions

View File

@@ -290,6 +290,10 @@ class PrimordialModel(CreatedModifiedModel):
if hasattr(field, 'attname'):
if field.attname == 'id':
continue
elif field.attname.endswith('ptr_id'):
# polymorphic fields should always be non-editable, see:
# https://github.com/django-polymorphic/django-polymorphic/issues/349
continue
if getattr(field, 'editable', True):
fds.add(field.attname)
return fds