Skip to content

Commit

Permalink
Merge pull request #56 from laurapanzariello/master
Browse files Browse the repository at this point in the history
fix refactor of style
  • Loading branch information
Laura authored Dec 7, 2018
2 parents fd910ba + 56b10c7 commit 0874079
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions CadVlan/EquipInterface/views_v3.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,7 @@ def delete_interface(request, interface_id=None):
logger.error(e)
messages.add_message(request, messages.ERROR, e)

url = request.META.get('HTTP_REFERER')
if request.META.get('HTTP_REFERER')
else reverse('interface.list')
url = request.META.get('HTTP_REFERER') if request.META.get('HTTP_REFERER') else reverse('interface.list')

return HttpResponseRedirect(url)

Expand All @@ -179,9 +177,7 @@ def add_channel(request, interface_id=None):
else:
messages.add_message(request, messages.ERROR,
"Select an interface.")
url_param = request.META.get('HTTP_REFERER')
if request.META.get('HTTP_REFERER')
else reverse('interface.list')
url_param = request.META.get('HTTP_REFERER') if request.META.get('HTTP_REFERER') else reverse('interface.list')

return HttpResponseRedirect(url_param)

Expand Down Expand Up @@ -215,8 +211,6 @@ def delete_channel(request, interface_id=None):
logger.error(e)
messages.add_message(request, messages.ERROR, e)

url = request.META.get('HTTP_REFERER')
if request.META.get('HTTP_REFERER')
else reverse('interface.list')
url = request.META.get('HTTP_REFERER') if request.META.get('HTTP_REFERER') else reverse('interface.list')

return HttpResponseRedirect(url)

0 comments on commit 0874079

Please sign in to comment.