Authorization Rule Import Error

Hi,

As I try to import the Autorization Rule import template, I get the following error.

Anybody knows if I’m missing something?

Thanks

Jay

Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/data_import/importer.py”, line 395, in upload
doc.insert()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 220, in insert
self._validate_links()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py”, line 717, in validate_links
invalid_links, cancelled_links = self.get_invalid_links()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/base_document.py”, line 438, in get_invalid_links
frappe.throw(
(“{0} must be set first”).format(self.meta.get_label(df.options)))
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 323, in throw
msgprint(msg, raise_exception=exc, title=title, indicator=‘red’)
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 309, in msgprint
_raise_exception()
File “/home/frappe/frappe-bench/apps/frappe/frappe/init.py”, line 282, in _raise_exception
raise raise_exception(encode(msg))
ValidationError: Customer or Item must be set first

Hi Jay,

You are not missing anything. it’s a bug. i have to import around 600 rules…lucky worked on it yesterday.

so i did a workaround. which was not straight forward.
it includes creating rules first by duplicating rule. and 2nd i update them in DB.

and it worked.