Skip to content

Commit

Permalink
[Fixes #9092] The Upload Workflow never updates the Resource files (#…
Browse files Browse the repository at this point in the history
…9091)

* - Fixing a variable referenced before assignment

 - Avoid import_session to be commited twice

* - Making sure we don't have duplicated Upload Sessions on the DB

* Fix upload workflow

* Fix LGTM issue

* Fix upload regression for 33x

* [Fixes #9092] Fix upload regression for 33x

Co-authored-by: afabiani <[email protected]>
  • Loading branch information
mattiagiupponi and afabiani authored Apr 13, 2022
1 parent 9e21415 commit acb0d5d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions geonode/upload/upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -884,9 +884,6 @@ def final_step(upload_session, user, charset="UTF-8", layer_id=None):
assert _upload
assert saved_layer

_upload.layer = saved_layer
_upload.save()

if not created and not overwrite:
return saved_layer

Expand Down Expand Up @@ -1011,6 +1008,9 @@ def _store_file(saved_layer,

saved_layer = utils.metadata_storers(saved_layer, custom)

if upload_session:
Upload.objects.update_from_session(upload_session, layer=saved_layer)

return saved_layer


Expand Down

0 comments on commit acb0d5d

Please sign in to comment.