Skip to content

Commit

Permalink
link added
Browse files Browse the repository at this point in the history
link added
  • Loading branch information
Anjaneyulu authored and ashwin31 committed Jul 22, 2016
1 parent b919a18 commit 328b74b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">DjangoBlogIt</a>
<a class="navbar-brand" href="/">DjangoBlogIt</a>
</div>

<!-- Collect the nav links, forms, and other content for toggling -->
Expand Down
4 changes: 3 additions & 1 deletion django_blog_it/django_blog_it/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,9 @@ class UserUpdateView(AdminOnlyMixin, UpdateView):
pk = "pk"

def get_initial(self):
return {'role': self.object.userrole_set.last().role}
if self.object.userrole_set.last():
return {'role': self.object.userrole_set.last().role}
return {}

def form_valid(self, form):
user = form.save()
Expand Down

0 comments on commit 328b74b

Please sign in to comment.