Skip to content

Commit

Permalink
Avoid error in addcontact when there is no directory
Browse files Browse the repository at this point in the history
  • Loading branch information
cedricmessiant committed Mar 1, 2017
1 parent fcf1812 commit 42623cb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ Changelog
1.13 (unreleased)
-----------------

- Nothing changed yet.
- Avoid error in addcontact when there is no directory.
[cedricmessiant]


1.12 (2017-01-17)
Expand Down
2 changes: 1 addition & 1 deletion src/collective/contact/core/browser/addcontact.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ def add_contact_infos(self, widget):
addlink_enabled = False

close_on_click = True
custom_settings = queryAdapter(directory, ICustomSettings, default=self)
if addlink_enabled:
custom_settings = queryAdapter(directory, ICustomSettings, default=self)
directory_url = directory.absolute_url()
if len(portal_types) == 1:
portal_type = portal_types[0]
Expand Down

0 comments on commit 42623cb

Please sign in to comment.