Skip to content
Permalink
Browse files

Fix typo

  • Loading branch information...
ibot3 committed Sep 11, 2019
1 parent 90fbf2a commit 68cb5d71c3a2df124a090f0cc01658ecc4b8dd70
Showing with 8 additions and 8 deletions.
  1. +3 −3 sipa/blueprints/usersuite.py
  2. +1 −1 sipa/model/exceptions.py
  3. +4 −4 sipa/model/pycroft/user.py
@@ -19,7 +19,7 @@
from sipa.mail import send_usersuite_contact_mail
from sipa.utils import password_changeable
from sipa.model.exceptions import DBQueryEmpty, LDAPConnectionError, \
PasswordInvalid, UserNotFound, MacAlreadyExists, TerminationNotPossible, UnkownError, \
PasswordInvalid, UserNotFound, MacAlreadyExists, TerminationNotPossible, UnknownError, \
ContinuationNotPossible
from sipa.model.misc import PaymentDetails

@@ -489,7 +489,7 @@ def terminate_membership_confirm():
form.estimated_balance.default = current_user.estimate_balance(
end_date)

except UnkownError:
except UnknownError:
flash(gettext("Unbekannter Fehler!"), "error")
else:
form.end_date.default = end_date
@@ -544,7 +544,7 @@ def continue_membership():
current_user.continue_membership()
except ContinuationNotPossible:
flash(gettext("Fortsetzung der Mitgliedschaft nicht möglich!"), "error")
except UnkownError:
except UnknownError:
flash(gettext("Unbekannter Fehler!"), "error")
else:
logger.info('Successfully cancelled membership termination',
@@ -43,5 +43,5 @@ class LDAPConnectionError(Exception):
pass


class UnkownError(Exception):
class UnknownError(Exception):
pass
@@ -7,7 +7,7 @@
unsupported_prop, ActiveProperty, UnsupportedProperty, Capabilities
from sipa.model.misc import PaymentDetails
from sipa.model.exceptions import UserNotFound, PasswordInvalid, \
MacAlreadyExists, NetworkAccessAlreadyActive, TerminationNotPossible, UnkownError, \
MacAlreadyExists, NetworkAccessAlreadyActive, TerminationNotPossible, UnknownError, \
ContinuationNotPossible
from .api import PycroftApi
from .exc import PycroftBackendError
@@ -152,23 +152,23 @@ def terminate_membership(self, end_date):
if status == 400:
raise TerminationNotPossible
elif status != 200:
raise UnkownError
raise UnknownError

def estimate_balance(self, end_date):
status, result = api.estimate_balance_at_end_of_membership(self.user_data.id, end_date)

if status == 200:
return result['estimated_balance']
else:
raise UnkownError
raise UnknownError

def continue_membership(self):
status, result = api.continue_membership(self.user_data.id)

if status == 400:
raise ContinuationNotPossible
elif status != 200:
raise UnkownError
raise UnknownError

@active_prop
def mail(self):

0 comments on commit 68cb5d7

Please sign in to comment.
You can’t perform that action at this time.