Skip to content

Commit

Permalink
🐛 Fix broken inlines when CMIS_URL_MAPPING_ENABLED is false
Browse files Browse the repository at this point in the history
  • Loading branch information
sergei-maertens committed Feb 5, 2021
1 parent 56c0d91 commit 5cb6f2d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[bumpversion]
commit = False
tag = False
current_version = 1.2.0
current_version = 1.2.1

[bumpversion:file:setup.cfg]

Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Documenten API CMIS adapter
===========================

:Version: 1.2.0
:Version: 1.2.1
:Source: https://github.com/open-zaak/cmis-adapter
:Keywords: CMIS, Documenten API, VNG, Common Ground
:PythonVersion: 3.7
Expand Down
7 changes: 6 additions & 1 deletion drc_cmis/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ def has_change_permission(self, request, obj=None):

@admin.register(CMISConfig)
class CMISConfigAdmin(SingletonModelAdmin):
inlines = [UrlMappingAdmin]
change_form_template = "configuration_form.html"
form = CMISConfigAdminForm

Expand Down Expand Up @@ -107,6 +106,12 @@ def get_urls(self):
]
return extra_urls + urls

@property
def inlines(self):
if settings.CMIS_URL_MAPPING_ENABLED:
return [UrlMappingAdmin]
return []

def cmis_connection_view(self, request):
return CMISConnectionJSONView.as_view(model_admin=self)(request)

Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = drc-cmis
version = 1.2.0
version = 1.2.1
description = An adapter to manage Documenten API resources in a CMIS backend.
long_description = file: README.rst
url = https://github.com/open-zaak/cmis-adapter
Expand Down

0 comments on commit 5cb6f2d

Please sign in to comment.