Modèles de commentaires et de notifications #18

Merged
lstephan merged 21 commits from Aufinal/communication_models into master 2017-07-21 16:58:51 +02:00
Showing only changes of commit 782cb34b0e - Show all commits

View file

@ -178,7 +178,7 @@ class Activity(AbstractActivityTemplate):
inherited_fields = [f.name for f in ActivityTemplate._meta.get_fields()]
m2m_fields = [f.name for f in ActivityTemplate._meta.get_fields()
if f.many_to_many]
attr = super(Activity, self).__getattribute__(attrname)
attr = getattr(self, attrname)
if attrname not in inherited_fields:
raise FieldError(
_("%(attrname)s n'est pas un champ héritable"),
@ -188,9 +188,9 @@ class Activity(AbstractActivityTemplate):
if attr.exists():
return attr
else:
return self.parent.__getattribute__(attrname)
return getattr(self.parent, attrname)
elif attr is None:
return self.parent.__getattribute__(attrname)
return getattr(self.parent, attrname)
else:
return attr