Skip to content

Commit

Permalink
fix create_file method so that subject and description are also accepted
Browse files Browse the repository at this point in the history
  • Loading branch information
theoden42 committed Feb 19, 2024
1 parent 402c8c4 commit 5c6ab07
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions FusionIIIT/applications/filetracking/sdk/methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ def create_file(
uploader_designation: str,
receiver: str,
receiver_designation: str,
subject: str = "",
description: str = "",
src_module: str = "filetracking",
src_object_id: str = "",
file_extra_JSON: dict = {},
Expand Down Expand Up @@ -38,11 +40,14 @@ def create_file(

new_file = File.objects.create(
uploader=uploader_extrainfo_obj,
subject=subject,
description=description,
designation=uploader_designation_obj,
src_module=src_module,
src_object_id=src_object_id,
file_extra_JSON=file_extra_JSON,
)


if attached_file is not None:
new_file.upload_file.save(attached_file.name, attached_file, save=True)
Expand Down

0 comments on commit 5c6ab07

Please sign in to comment.