EMA
* fixes created timestamp in detail views where modified needs to be displayed * adds fallback timestamp if data has not been edited, yet --> show created timestamp * fixes bug where deleting of certain data didn't redirect to the index view * adds quality_check() method for EMA, needed for recording * adds all functions which are provided for compensations to EMA * adds/updates translations
This commit is contained in:
@@ -257,9 +257,17 @@ class EcoAccount(AbstractCompensation):
|
||||
y,
|
||||
)
|
||||
|
||||
def quality_check(self) -> (bool, dict):
|
||||
# ToDo
|
||||
pass
|
||||
def quality_check(self) -> list:
|
||||
""" Quality check
|
||||
|
||||
Returns:
|
||||
ret_msgs (list): Holds error messages
|
||||
"""
|
||||
ret_msgs = []
|
||||
|
||||
# ToDo: Add check methods!
|
||||
|
||||
return ret_msgs
|
||||
|
||||
|
||||
class EcoAccountWithdraw(BaseResource):
|
||||
|
||||
@@ -63,9 +63,9 @@
|
||||
<tr>
|
||||
<th scope="row">{% trans 'Last modified' %}</th>
|
||||
<td class="align-middle">
|
||||
{{obj.created.timestamp|default_if_none:""|naturalday}}
|
||||
{{obj.modified.timestamp|default_if_none:""|naturalday}}
|
||||
<br>
|
||||
{{obj.created.user.username}}
|
||||
{{obj.modified.user.username}}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@@ -55,9 +55,9 @@
|
||||
<tr>
|
||||
<th scope="row">{% trans 'Last modified' %}</th>
|
||||
<td class="align-middle">
|
||||
{{obj.created.timestamp|default_if_none:""|naturalday}}
|
||||
{{obj.modified.timestamp|default_if_none:""|naturalday}}
|
||||
<br>
|
||||
{{obj.created.user.username}}
|
||||
{{obj.modified.user.username}}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@@ -141,7 +141,7 @@ def remove_view(request: HttpRequest, id: str):
|
||||
return form.process_request(
|
||||
request=request,
|
||||
msg_success=_("Compensation removed"),
|
||||
redirect_url="",
|
||||
redirect_url=reverse("compensation:index"),
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user