diff --git a/openslides/application/models.py b/openslides/application/models.py index e45215fb1..ebeb6ccbc 100644 --- a/openslides/application/models.py +++ b/openslides/application/models.py @@ -353,13 +353,15 @@ class Application(models.Model): if name is title, text, reason or time, Return this attribute from the newest version of the application """ - if name in ('title', 'text', 'reason', 'time'): + if name in ('title', 'text', 'reason', 'time', 'aid'): try: - return self.last_version.__dict__[name] + return self.permitted.__dict__[name] except TypeError: - raise AttributeError(name) + return self.last_version.__dict__[name] + #raise AttributeError(name) except AttributeError: - raise AttributeError(name) + return self.last_version.__dict__[name] + #raise AttributeError(name) raise AttributeError(name) def gen_poll(self, user=None): diff --git a/openslides/application/views.py b/openslides/application/views.py index 416121427..d9820a5ef 100644 --- a/openslides/application/views.py +++ b/openslides/application/views.py @@ -362,6 +362,7 @@ def view_poll(request, poll_id): def permit_version(request, aversion_id): aversion = AVersion.objects.get(pk=aversion_id) application = aversion.application + application.accept_version(aversion) messages.success(request, _("Version accepted") ) return redirect(reverse('application_view', args=[application.id]))