diff options
author | Matthew Lemon <y@yulqen.org> | 2024-05-14 17:04:55 +0100 |
---|---|---|
committer | Matthew Lemon <y@yulqen.org> | 2024-05-14 17:04:55 +0100 |
commit | 82d718de5e98b8543796ee61f112ab1e4177d850 (patch) | |
tree | 46da2fd07d22551713887eebc86725fc435b6022 /pyblackbird_cc/resources/views.py | |
parent | e7e57126b90208dadb39b2d4b67864a690cd81f4 (diff) |
Further tidying
Diffstat (limited to 'pyblackbird_cc/resources/views.py')
-rw-r--r-- | pyblackbird_cc/resources/views.py | 8 |
1 files changed, 3 insertions, 5 deletions
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( |