#114 Unshared Account Deductions

* enables deducting from unshared eco accounts
   * account must be recorded and not deleted, so users can use it for deductions
This commit is contained in:
2022-02-16 12:35:19 +01:00
parent a58532322e
commit 7091b3d707
5 changed files with 13 additions and 20 deletions

View File

@@ -25,7 +25,7 @@ from intervention.models import Intervention
class EcoAccountAutocomplete(Select2QuerySetView):
""" Autocomplete for ecoAccount entries
Only returns entries that are accessible for the requesting user and already are recorded
Only returns entries that are already recorded and not deleted
"""
def get_queryset(self):
@@ -34,7 +34,6 @@ class EcoAccountAutocomplete(Select2QuerySetView):
qs = EcoAccount.objects.filter(
deleted=None,
recorded__isnull=False,
users__in=[self.request.user],
).order_by(
"identifier"
)