Always call set_spec_id

This commit is contained in:
Matthew Tretter 2013-04-05 14:57:41 -04:00
parent 41ab2c0fa3
commit 091b2137d0

View file

@ -12,13 +12,13 @@ class SpecHostField(SpecHost):
# Generate a spec_id to register the spec with. The default spec id is
# "<app>:<model>_<field>"
if not getattr(self, 'spec_id', None):
if not spec_id:
spec_id = (u'%s:%s:%s' % (cls._meta.app_label,
cls._meta.object_name, name)).lower()
# Register the spec with the id. This allows specs to be overridden
# later, from outside of the model definition.
super(SpecHostField, self).set_spec_id(spec_id)
# Register the spec with the id. This allows specs to be overridden
# later, from outside of the model definition.
super(SpecHostField, self).set_spec_id(spec_id)
class ImageSpecField(SpecHostField):