application.aid is the permitted aid, or the last aid
This commit is contained in:
parent
89386a4ac7
commit
da14eca296
@ -355,11 +355,14 @@ class Application(models.Model):
|
|||||||
"""
|
"""
|
||||||
if name in ('title', 'text', 'reason', 'time', 'aid'):
|
if name in ('title', 'text', 'reason', 'time', 'aid'):
|
||||||
try:
|
try:
|
||||||
|
if name == 'aid':
|
||||||
|
return self.permitted.aid
|
||||||
return self.permitted.__dict__[name]
|
return self.permitted.__dict__[name]
|
||||||
except TypeError:
|
except TypeError:
|
||||||
return self.last_version.__dict__[name]
|
raise AttributeError(name)
|
||||||
#raise AttributeError(name)
|
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
|
if name == 'aid':
|
||||||
|
return self.last_version.aid
|
||||||
return self.last_version.__dict__[name]
|
return self.last_version.__dict__[name]
|
||||||
#raise AttributeError(name)
|
#raise AttributeError(name)
|
||||||
raise AttributeError(name)
|
raise AttributeError(name)
|
||||||
|
Loading…
Reference in New Issue
Block a user