# 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

@@ -11,6 +11,7 @@ from django.contrib import messages
from django.db import models
from django.db.models import QuerySet
from django.http import HttpRequest
from django.urls import reverse
from compensation.models import AbstractCompensation
from ema.managers import EmaManager
@@ -119,6 +120,14 @@ class Ema(AbstractCompensation, ShareableObjectMixin, RecordableObjectMixin):
is_ready = is_recorded
return is_ready
def get_share_link(self):
""" Returns the share url for the object
Returns:
"""
return reverse("ema:share", args=(self.id, self.access_token))
class EmaDocument(AbstractDocument):
"""