Skip to content

Commit

Permalink
Fix bug on upload of media on editing.
Browse files Browse the repository at this point in the history
  • Loading branch information
wlorenzetti committed Mar 8, 2024
1 parent 9fe82fa commit af22777
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions g3w-admin/core/utils/vector.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,8 @@ def new_value(self, change=False):
path_file_to_save = '{}/{}'.format(path_to_save, file_name)

# Check if it is a user-media view
is_media_view = True
try:

# Before is necessary remo domain
resolve(urllib.parse.urlparse(self.feature_properties[field]).path)
except:
is_media_view = False
url_path = urllib.parse.urlparse(self.feature_properties[field]).path
is_media_view = bool(url_path) and url_path.startswith('/media/temp_uploads/')

if change:
if self.feature_properties[field]:
Expand Down

0 comments on commit af22777

Please sign in to comment.