From 82d718de5e98b8543796ee61f112ab1e4177d850 Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Tue, 14 May 2024 17:04:55 +0100 Subject: Further tidying --- pyblackbird_cc/resources/views.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'pyblackbird_cc/resources/views.py') diff --git a/pyblackbird_cc/resources/views.py b/pyblackbird_cc/resources/views.py index b09f37e..c3e79ff 100644 --- a/pyblackbird_cc/resources/views.py +++ b/pyblackbird_cc/resources/views.py @@ -86,8 +86,8 @@ def _extract_metadata_from_resource(resource_obj) -> ResourceInfo | None: snapshot_urls=snapshot_url_dict, thumbnail_filenames=resource_obj.thumbnail_filenames, thumbnail_urls=thumbnail_urls, - created=resource_obj.created_at.strftime("%Y-%m-%d %H:%M:%S"), - updated=resource_obj.updated_at.strftime("%Y-%m-%d %H:%M:%S"), + created=resource_obj.created_at, + updated=resource_obj.updated_at, ) except Exception as e: logging.exception(f"Error extracting resource information: {e}") @@ -232,9 +232,7 @@ def create_resource(request): age_range = form.cleaned_data["age_range"] curriculum = form.cleaned_data["curriculum"] main_resource_category = form.cleaned_data["main_resource_category"] - additional_resource_category = form.cleaned_data[ - "additional_resource_category" - ] + additional_resource_category = form.cleaned_data["additional_resource_category"] try: resource = Resource.objects.create( -- cgit v1.2.3