From 5029246228c5d09ed3bf57875902b68e46590844 Mon Sep 17 00:00:00 2001 From: Paul Schreiber Date: Wed, 13 Dec 2023 11:12:24 -0500 Subject: [PATCH] fix: assume https for URLField removes deprecation warning --- terraso_backend/apps/shared_data/forms.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/terraso_backend/apps/shared_data/forms.py b/terraso_backend/apps/shared_data/forms.py index 78f02a856..fdcdceecd 100644 --- a/terraso_backend/apps/shared_data/forms.py +++ b/terraso_backend/apps/shared_data/forms.py @@ -33,7 +33,9 @@ class DataEntryForm(forms.ModelForm): data_file = forms.FileField() - url = forms.URLField(required=False) + # TODO: Remove assume_scheme='https' when Django 6.0 is released. + # At that point, https will be the default. + url = forms.URLField(required=False, assume_scheme="https") resource_type = forms.CharField(max_length=255, required=False) size = forms.IntegerField(required=False)