Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
""" Model that stores raw information from the UTC database regarding university partners.
Some universities in UTC database are present multiple times. To accommodate for this, We store the data separetly and one REX-DRI university may link to multiple UTC partners. """
# fields mapping directly to those of UTC db
# field that will have to be set manually University, null=True, on_delete=models.PROTECT, related_name="corresponding_utc_partners", )
""" Custom handling of denormalization """ # it has already been saved to the db (previous.university is None and self.university is not None) or (previous.university is not None and self.university is None) or ( previous.university is not None and self.university is not None and previous.university.pk != self.university.pk ) ):
exchange.save() # Trigger denormalisation update offer.save() # Trigger denormalisation update |