Attention une mise à jour du service Gitlab va être effectuée le mardi 30 novembre entre 17h30 et 18h00. Cette mise à jour va générer une interruption du service dont nous ne maîtrisons pas complètement la durée mais qui ne devrait pas excéder quelques minutes. Cette mise à jour intermédiaire en version 14.0.12 nous permettra de rapidement pouvoir mettre à votre disposition une version plus récente.

Commit 5311d3a7 authored by LETORT Sebastien's avatar LETORT Sebastien
Browse files

WebappVersion.webapp related_name changed from 'webapp' to 'version'.

parent 0f68b0e0
Pipeline #93901 passed with stages
in 3 minutes and 35 seconds
...@@ -222,9 +222,9 @@ def query_webapps_for_user(user): ...@@ -222,9 +222,9 @@ def query_webapps_for_user(user):
# select webapps that are either public or owned by the user # select webapps that are either public or owned by the user
# if only_published_version is True, then only published version of non user app # if only_published_version is True, then only published version of non user app
# are returned. # are returned.
# webapp__ refers to WebappVersion_set, with 'related_name' # version__ refers to WebappVersion_set, with 'related_name'
# cf https://docs.djangoproject.com/en/2.2/topics/db/queries/#following-relationships-backward # cf https://docs.djangoproject.com/en/2.2/topics/db/queries/#following-relationships-backward
q_filter = Q(private=False) & Q(webapp__published=True) q_filter = Q(private=False) & Q(version__published=True)
qs = Webapp.objects \ qs = Webapp.objects \
.filter(Q(user_id=user.id) | q_filter) \ .filter(Q(user_id=user.id) | q_filter) \
......
...@@ -423,7 +423,7 @@ class WebappVersion(TimeStampModel): ...@@ -423,7 +423,7 @@ class WebappVersion(TimeStampModel):
# flag indicating if this version was imported from rails # flag indicating if this version was imported from rails
imported = models.BooleanField(default=False) imported = models.BooleanField(default=False)
webapp = models.ForeignKey('Webapp', on_delete=models.CASCADE, related_name="webapp") webapp = models.ForeignKey('Webapp', on_delete=models.CASCADE, related_name="version")
class Meta: class Meta:
db_table = 'dj_webapp_versions' db_table = 'dj_webapp_versions'
......
Markdown is supported
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