# 86 Viewport jump EcoAccount/EMA

* adds direct jump of viewport on related-data action (create/delete)
This commit is contained in:
2022-02-02 11:26:02 +01:00
parent 299923ef45
commit d5e23b420e
34 changed files with 247 additions and 167 deletions

View File

@@ -7,6 +7,8 @@ Created on: 16.11.21
"""
import shutil
from django.urls import reverse
from user.models import User
from django.core.exceptions import ValidationError
from django.core.validators import MinValueValidator
@@ -203,6 +205,14 @@ class EcoAccount(AbstractCompensation, ShareableObjectMixin, RecordableObjectMix
is_ready = is_recorded
return is_ready
def get_share_link(self):
""" Returns the share url for the object
Returns:
"""
return reverse("compensation:acc:share", args=(self.id, self.access_token))
class EcoAccountDocument(AbstractDocument):
"""