From 95f4d7856a12f8b7ec795784eef2c43e5c3fcbfe Mon Sep 17 00:00:00 2001 From: Schylar Utley Date: Wed, 20 Jan 2021 15:47:44 -0600 Subject: [PATCH] Update startup_scripts/280_custom_links.py MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Christian Mäder --- startup_scripts/280_custom_links.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/startup_scripts/280_custom_links.py b/startup_scripts/280_custom_links.py index 7545a0b..83da718 100644 --- a/startup_scripts/280_custom_links.py +++ b/startup_scripts/280_custom_links.py @@ -11,8 +11,7 @@ if custom_links is None: def get_content_type_id(content_type_str): try: - id = ContentType.objects.get(model=content_type_str).id - return id + return ContentType.objects.get(model=content_type_str).id except ContentType.DoesNotExist: print("⚠️ Error determining content type id for user declared var: {0}".format(content_type_str))