From 6bb5f9faf2128f1d36547f8cf4f0f1c445e2c53f Mon Sep 17 00:00:00 2001 From: Florent Chehab Date: Tue, 23 Apr 2019 20:59:37 +0200 Subject: [PATCH] Checked that all the JSON Fields are meaning ful * No particular action wad required * Simply added some comments when no validators are present Fixes #113 --- backend/backend_app/models/exchange.py | 1 + backend/backend_app/models/pendingModeration.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/backend/backend_app/models/exchange.py b/backend/backend_app/models/exchange.py index f2998666..d1027071 100644 --- a/backend/backend_app/models/exchange.py +++ b/backend/backend_app/models/exchange.py @@ -26,6 +26,7 @@ class Exchange(BaseModel): utc_allow_courses = models.BooleanField() utc_allow_login = models.BooleanField() + # No specific validation of the JSON is required here courses = JSONField(null=True) # Store data from ENT diff --git a/backend/backend_app/models/pendingModeration.py b/backend/backend_app/models/pendingModeration.py index 8d12e2cd..41a88dae 100644 --- a/backend/backend_app/models/pendingModeration.py +++ b/backend/backend_app/models/pendingModeration.py @@ -26,6 +26,8 @@ class PendingModeration(BaseModel): updated_on = models.DateTimeField(null=True) # Object pending moderation + # No validation of the JSON it's used internally only and the data is + # validated before arriving here. new_object = JSONField(default=dict) class Meta: -- GitLab