konova/intervention/managers.py
mpeltriaux 80bdee5230 EcoAccount fixes
* adds deductable surface field into NewEcoAccountForm directly
* removes custom manager for LegalData and ResponsibilityData
2021-10-20 10:28:01 +02:00

26 lines
625 B
Python

"""
Author: Michel Peltriaux
Organization: Struktur- und Genehmigungsdirektion Nord, Rhineland-Palatinate, Germany
Contact: michel.peltriaux@sgdnord.rlp.de
Created on: 14.10.21
"""
from django.db import models
class InterventionManager(models.Manager):
""" Holds default db fetch setting for this model type
"""
def get_queryset(self):
return super().get_queryset().select_related(
"recorded",
"recorded__user",
"modified",
"modified__user",
"checked",
"checked__user",
).prefetch_related(
"users",
)