Commit 797fc4e6 authored by Imane Misrar's avatar Imane Misrar
Browse files

feat( : add isDestinationOpen key for denormalized_infos

Relates to #148
parent 7fa26980
......@@ -75,9 +75,19 @@ class UniversityViewSet(EssentialModuleViewSet):
def update_denormalized_univ_field():"Computing the denormalized offers/semester/major in university")
for university in University.objects.all().prefetch_related("offers", "exchanges"):
for university in University.objects.all().prefetch_related(
"offers", "exchanges", "corresponding_utc_partners"
denormalized_infos = dict()
# handling of corresponding_utc_partners
denormalized_infos["isDestinationOpen"] = (
> 0
# handling of offers
for offer in university.offers.all():
semester = "{}{}".format(offer.semester, offer.year)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment