From da14eca2966d026edba367f95e953c3fb8777bed Mon Sep 17 00:00:00 2001 From: Oskar Hahn Date: Sun, 4 Sep 2011 10:34:30 +0200 Subject: [PATCH] application.aid is the permitted aid, or the last aid --- openslides/application/models.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/openslides/application/models.py b/openslides/application/models.py index ebeb6ccbc..c7b3dab58 100644 --- a/openslides/application/models.py +++ b/openslides/application/models.py @@ -355,11 +355,14 @@ class Application(models.Model): """ if name in ('title', 'text', 'reason', 'time', 'aid'): try: + if name == 'aid': + return self.permitted.aid return self.permitted.__dict__[name] except TypeError: - return self.last_version.__dict__[name] - #raise AttributeError(name) + raise AttributeError(name) except AttributeError: + if name == 'aid': + return self.last_version.aid return self.last_version.__dict__[name] #raise AttributeError(name) raise AttributeError(name)