Commit 704afb37 authored by Ayush Tiwari's avatar Ayush Tiwari

bt5_config: Add connection argument which can be used while calling it from...

bt5_config: Add connection argument which can be used while calling it from context with no aq_parent
parent 44601f0f
......@@ -321,11 +321,12 @@ class BusinessManager(Folder):
f.close()
security.declareProtected(Permissions.ManagePortal, 'importFile')
def importFile(self, path):
def importFile(self, path, connection=None):
"""
Import Business Manager object and all attribute to current BM itself
"""
connection = self.aq_parent._p_jar
if not connection:
connection = self.aq_parent._p_jar
file = open(path, 'rb')
imported_manager = connection.importFile(file)
self.title = imported_manager.title
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment