From d01c397bb45fcaa52e44cfa49b204bfac5ec458a Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Thu, 21 Sep 2017 10:41:33 +0100 Subject: [PATCH] Allow creation of an organisation without a logo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Now we have the org banner branding, not all organisations need a logo. So it shouldn’t be an error to not provide one. Depends on: - [ ] https://github.com/alphagov/notifications-api/pull/1265 --- app/main/views/organisations.py | 4 ++- app/templates/components/page-footer.html | 5 ++- .../views/organisations/manage-org.html | 3 +- tests/app/main/views/test_organisations.py | 35 ++++++++++++++----- 4 files changed, 32 insertions(+), 15 deletions(-) diff --git a/app/main/views/organisations.py b/app/main/views/organisations.py index 0fe976752..c7d41a38e 100644 --- a/app/main/views/organisations.py +++ b/app/main/views/organisations.py @@ -71,7 +71,9 @@ def manage_org(logo=None): return redirect( url_for('.manage_org', logo=upload_filename)) - logo = persist_logo(logo, session["user_id"]) + if logo: + logo = persist_logo(logo, session["user_id"]) + delete_temp_files_created_by(session["user_id"]) if org: diff --git a/app/templates/components/page-footer.html b/app/templates/components/page-footer.html index 74b847a0c..5dcc69e4f 100644 --- a/app/templates/components/page-footer.html +++ b/app/templates/components/page-footer.html @@ -6,13 +6,12 @@ secondary_link=False, secondary_link_text=None, delete_link=False, - delete_link_text="delete", - button_disabled=False + delete_link_text="delete" ) %}