[Feature] Search for Permissions, Prep Compound / Structure to be extended, Prep Template overwrites (#347)

Co-authored-by: Tim Lorsbach <tim@lorsba.ch>
Reviewed-on: enviPath/enviPy#347
This commit is contained in:
2026-03-11 11:27:15 +13:00
parent d4295c9349
commit b737fc93eb
12 changed files with 242 additions and 27 deletions

View File

@ -765,7 +765,12 @@ class Package(EnviPathModel):
class Compound(
EnviPathModel, AliasMixin, ScenarioMixin, ChemicalIdentifierMixin, AdditionalInformationMixin
PolymorphicModel,
EnviPathModel,
AliasMixin,
ScenarioMixin,
ChemicalIdentifierMixin,
AdditionalInformationMixin,
):
package = models.ForeignKey(
s.EPDB_PACKAGE_MODEL, verbose_name="Package", on_delete=models.CASCADE, db_index=True
@ -1095,7 +1100,12 @@ class Compound(
class CompoundStructure(
EnviPathModel, AliasMixin, ScenarioMixin, ChemicalIdentifierMixin, AdditionalInformationMixin
PolymorphicModel,
EnviPathModel,
AliasMixin,
ScenarioMixin,
ChemicalIdentifierMixin,
AdditionalInformationMixin,
):
compound = models.ForeignKey("epdb.Compound", on_delete=models.CASCADE, db_index=True)
smiles = models.TextField(blank=False, null=False, verbose_name="SMILES")
@ -4138,7 +4148,7 @@ class Scenario(EnviPathModel):
ais = AdditionalInformation.objects.filter(scenario=self)
if direct_only:
return ais.filter(content_object__isnull=True)
return ais.filter(object_id__isnull=True)
else:
return ais