Permalink
Browse files

Fix traffic display check

Fixes #400
  • Loading branch information...
Georgeto committed Feb 12, 2019
1 parent 36ac84a commit bc90cf42396424ac90ddeadd896d0355777391d3
Showing with 6 additions and 2 deletions.
  1. +6 −2 sipa/model/misc.py
@@ -10,6 +10,10 @@
PaymentDetails = namedtuple('PaymentDetails', 'recipient bank iban bic purpose')


def has_connection(user):
return user.is_authenticated and user.has_connection


def should_display_traffic_data():
return ((current_user.is_authenticated and current_user.has_connection) or
backends.user_from_ip(request.remote_addr) is not None)
return has_connection(current_user) or has_connection(
backends.user_from_ip(request.remote_addr))

0 comments on commit bc90cf4

Please sign in to comment.