Authorization Rule Import Error


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

Anybody knows if I’m missing something?



Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/data_import/”, line 395, in upload
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/”, line 220, in insert
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/”, line 717, in validate_links
invalid_links, cancelled_links = self.get_invalid_links()
File “/home/frappe/frappe-bench/apps/frappe/frappe/model/”, line 438, in get_invalid_links
(“{0} must be set first”).format(self.meta.get_label(df.options)))
File “/home/frappe/frappe-bench/apps/frappe/frappe/”, line 323, in throw
msgprint(msg, raise_exception=exc, title=title, indicator=‘red’)
File “/home/frappe/frappe-bench/apps/frappe/frappe/”, line 309, in msgprint
File “/home/frappe/frappe-bench/apps/frappe/frappe/”, 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.