#329 fix attribute error for anonymous users in the application view
This commit is contained in:
parent
5a7d670873
commit
9a87db61cc
@ -322,7 +322,7 @@ class Application(models.Model, SlideMixin):
|
|||||||
if status not in actions and not force:
|
if status not in actions and not force:
|
||||||
raise NameError(_('The application status is: \'%(currentstatus)s\'. '\
|
raise NameError(_('The application status is: \'%(currentstatus)s\'. '\
|
||||||
'You can not set the status to \'%(newstatus)s\'.') % {
|
'You can not set the status to \'%(newstatus)s\'.') % {
|
||||||
'currentstatus': self.status,
|
'currentstatus': self.status,
|
||||||
'newstatus': status
|
'newstatus': status
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -343,6 +343,9 @@ class Application(models.Model, SlideMixin):
|
|||||||
user.profile
|
user.profile
|
||||||
except Profile.DoesNotExist:
|
except Profile.DoesNotExist:
|
||||||
is_admin = True
|
is_admin = True
|
||||||
|
except AttributeError:
|
||||||
|
# For the anonymous-user
|
||||||
|
pass
|
||||||
|
|
||||||
# check if user allowed to withdraw an application
|
# check if user allowed to withdraw an application
|
||||||
if ((self.status == "pub"
|
if ((self.status == "pub"
|
||||||
|
Loading…
Reference in New Issue
Block a user