* adds tests for compensations (WIP)
* refactors some dummy data generating into base test class
* fixes bugs detected by testing
* adds important requirements.txt change for itsdangerous package (<1.0.0 for compatibility to django-simple-sso)
This commit is contained in:
2021-10-27 14:44:49 +02:00
parent c4af63cea2
commit 30e5239c49
10 changed files with 435 additions and 43 deletions
+13
View File
@@ -229,6 +229,19 @@ class Compensation(AbstractCompensation):
self.identifier = self.generate_new_identifier()
super().save(*args, **kwargs)
def is_shared_with(self, user: User):
""" Access check
Checks whether a given user has access to this object
Args:
user ():
Returns:
"""
return self.intervention.users.filter(id=user.id)
def get_LANIS_link(self) -> str:
""" Generates a link for LANIS depending on the geometry