Update startup_scripts/280_custom_links.py

Co-authored-by: Christian Mäder <cimnine@users.noreply.github.com>
This commit is contained in:
Schylar Utley 2021-01-20 15:47:44 -06:00 committed by Christian Mäder
parent 07a0b1d7ef
commit 95f4d7856a

View File

@ -11,8 +11,7 @@ if custom_links is None:
def get_content_type_id(content_type_str): def get_content_type_id(content_type_str):
try: try:
id = ContentType.objects.get(model=content_type_str).id return ContentType.objects.get(model=content_type_str).id
return id
except ContentType.DoesNotExist: except ContentType.DoesNotExist:
print("⚠️ Error determining content type id for user declared var: {0}".format(content_type_str)) print("⚠️ Error determining content type id for user declared var: {0}".format(content_type_str))