Skip to content

Commit e0d8695

Browse files
committed
fix(logo): not fully deleted
* logo file hasn't been deleted. this prevented a new file upload, because of an sqlalchemy.exc.IntegrityError: (psycopg2.errors.UniqueViolation) error.
1 parent ca9e5d0 commit e0d8695

File tree

1 file changed

+3
-0
lines changed
  • invenio_communities/communities/services

1 file changed

+3
-0
lines changed

Diff for: invenio_communities/communities/services/service.py

+3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
# Copyright (C) 2016-2024 CERN.
55
# Copyright (C) 2021-2022 Northwestern University.
66
# Copyright (C) 2022 Graz University of Technology.
7+
# Copyright (C) 2024 Graz University of Technology.
78
#
89
# Invenio is free software; you can redistribute it and/or modify it
910
# under the terms of the MIT License; see LICENSE file for more details.
@@ -278,6 +279,8 @@ def delete_logo(self, identity, id_, uow=None):
278279
if deleted_file is None:
279280
raise FileNotFoundError()
280281

282+
deleted_file.delete(force=True)
283+
281284
uow.register(RecordCommitOp(record))
282285

283286
return self.files.file_result_item(

0 commit comments

Comments
 (0)