Some issues with unique restraint when re-saving objects.
This commit is contained in:
parent
4e0b5be962
commit
9ee6b718da
2 changed files with 5 additions and 6 deletions
|
|
@ -775,13 +775,12 @@ class TypeclassBase(SharedMemoryModelBase):
|
||||||
attrs["path"] = "%s.%s" % (attrs["__module__"], name)
|
attrs["path"] = "%s.%s" % (attrs["__module__"], name)
|
||||||
|
|
||||||
# typeclass proxy setup
|
# typeclass proxy setup
|
||||||
if "Meta" in attrs:
|
if not "Meta" in attrs:
|
||||||
attrs["Meta"].proxy = True
|
|
||||||
else:
|
|
||||||
class Meta:
|
class Meta:
|
||||||
proxy = True
|
proxy = True
|
||||||
attrs["Meta"] = Meta
|
attrs["Meta"] = Meta
|
||||||
|
attrs["Meta"].proxy = True
|
||||||
|
attrs["Meta"].app_label = attrs["path"]
|
||||||
|
|
||||||
# patch start - django multi-inheritance
|
# patch start - django multi-inheritance
|
||||||
# this is a copy of django.db.models.base.__new__
|
# this is a copy of django.db.models.base.__new__
|
||||||
|
|
|
||||||
|
|
@ -82,8 +82,8 @@ class SharedMemoryModelBase(ModelBase):
|
||||||
document this auto-wrapping in the class header, this could seem very much like magic to the user otherwise.
|
document this auto-wrapping in the class header, this could seem very much like magic to the user otherwise.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
#attrs["typename"] = cls.__name__
|
attrs["typename"] = cls.__name__
|
||||||
#attrs["path"] = "%s.%s" % (attrs["__module__"], name)
|
attrs["path"] = "%s.%s" % (attrs["__module__"], name)
|
||||||
|
|
||||||
# set up the typeclass handling only if a variable _is_typeclass is set on the class
|
# set up the typeclass handling only if a variable _is_typeclass is set on the class
|
||||||
def create_wrapper(cls, fieldname, wrappername, editable=True, foreignkey=False):
|
def create_wrapper(cls, fieldname, wrappername, editable=True, foreignkey=False):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue