diff options
author | Matthew Lemon <y@yulqen.org> | 2024-05-26 21:36:25 +0100 |
---|---|---|
committer | Matthew Lemon <y@yulqen.org> | 2024-05-26 21:36:25 +0100 |
commit | 1b777c8dec419a77891ab11ebf176f037c88e124 (patch) | |
tree | 60e505a58362785fc6da9f39374b1f78f22b5c7f /pyblackbird_cc/resources | |
parent | e18ea3cf7ff41bea1dec442c476f435acf0769e0 (diff) |
Removes extraneous code create_resource_objects
Diffstat (limited to 'pyblackbird_cc/resources')
-rw-r--r-- | pyblackbird_cc/resources/views.py | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/pyblackbird_cc/resources/views.py b/pyblackbird_cc/resources/views.py index 667fb0d..47121b5 100644 --- a/pyblackbird_cc/resources/views.py +++ b/pyblackbird_cc/resources/views.py @@ -218,26 +218,6 @@ def create_metadata( yield metadata, snapshot_images -#FIXME: Can't find a caller for this - delete it -@transaction.atomic -def create_resource_objects(resource, metadata_generator, thumbnail_files): - for metadata, snapshot_images in metadata_generator: - pdf_resource = PDFResource.objects.create( - resource=resource, - file_name=os.path.basename(metadata.file_name), - file_size=metadata.file_size, - ) - - for snapshot_image in snapshot_images: - PDFPageSnapshot.objects.create( - name="test", - file_name=os.path.basename(snapshot_image), - pdf_file=pdf_resource, - ) - - resource.thumbnail_filenames = [f.name for f in thumbnail_files] - resource.save() - @login_required def create_resource(request): |