Skip to content

Commit

Permalink
Fix traffic display check
Browse files Browse the repository at this point in the history
Fixes #400
  • Loading branch information
georgeto committed Feb 12, 2019
1 parent 36ac84a commit bc90cf4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions sipa/model/misc.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
PaymentDetails = namedtuple('PaymentDetails', 'recipient bank iban bic purpose') 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(): def should_display_traffic_data():
return ((current_user.is_authenticated and current_user.has_connection) or return has_connection(current_user) or has_connection(
backends.user_from_ip(request.remote_addr) is not None) backends.user_from_ip(request.remote_addr))

0 comments on commit bc90cf4

Please sign in to comment.