# 86 Viewport jump EcoAccount/EMA
* adds direct jump of viewport on related-data action (create/delete)
This commit is contained in:
@@ -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):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user