Skip to content

Commit

Permalink
Change dates backref as causing KeyErrors
Browse files Browse the repository at this point in the history
  • Loading branch information
Reillyhewitson committed Nov 3, 2022
1 parent 0ce5727 commit 99fb986
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions datagateway_api/src/datagateway_api/database/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ class DATAPUBLICATIONDATE(Base, EntityHelper, metaclass=EntityMeta):
DATAPUBLICATION = relationship(
"DATAPUBLICATION",
primaryjoin="DATAPUBLICATIONDATE.datapublicationId == DATAPUBLICATION.id",
backref="dates",
backref="dataPublicationDates",
)


Expand Down Expand Up @@ -550,7 +550,10 @@ class DATAPUBLICATIONUSER(Base, EntityHelper, metaclass=EntityMeta):
__pluralfieldname__ = "dataPublicationUsers"
__table_args__ = (
Index(
"UNQ_DATAPUBLICATIONUSER_0", "PUBLICATION_ID", "USER_ID", "CONTRIBUTORTYPE",
"UNQ_DATAPUBLICATIONUSER_0",
"DATAPUBLICATION_ID",
"USER_ID",
"CONTRIBUTORTYPE",
),
)

Expand Down

0 comments on commit 99fb986

Please sign in to comment.