#20 Multiple laws
* refactors law field from ForeignKey to ManyToManyField to support multiple laws being added to one LegalData object * added funding data to EMA detail view
This commit is contained in:
+2
-10
@@ -136,6 +136,7 @@ class RevocationDocument(AbstractDocument):
|
||||
# Folder seems to be missing already
|
||||
pass
|
||||
|
||||
|
||||
class LegalData(UuidModel):
|
||||
"""
|
||||
Holds intervention legal data such as important dates, laws or responsible handler
|
||||
@@ -158,11 +159,9 @@ class LegalData(UuidModel):
|
||||
"is_archived": False,
|
||||
}
|
||||
)
|
||||
law = models.ForeignKey(
|
||||
laws = models.ManyToManyField(
|
||||
KonovaCode,
|
||||
on_delete=models.SET_NULL,
|
||||
null=True,
|
||||
related_name="+",
|
||||
blank=True,
|
||||
limit_choices_to={
|
||||
"code_lists__in": [CODELIST_LAW_ID],
|
||||
@@ -173,13 +172,6 @@ class LegalData(UuidModel):
|
||||
|
||||
revocation = models.OneToOneField(Revocation, null=True, blank=True, help_text="Refers to 'Widerspruch am'", on_delete=models.SET_NULL)
|
||||
|
||||
def __str__(self):
|
||||
return "{} | {} | {}".format(
|
||||
self.process_type,
|
||||
self.law,
|
||||
self.id
|
||||
)
|
||||
|
||||
|
||||
class Intervention(BaseObject):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user