frappe / erpnext

Free and Open Source Enterprise Resource Planning (ERP)
https://erpnext.com
GNU General Public License v3.0
21.32k stars 7.27k forks source link

Issue in creating slideshow in website #15416

Open govindsmenokee opened 6 years ago

govindsmenokee commented 6 years ago

App Versions { "erpnext": "10.1.52", "frappe": "10.1.45" } Route Form/Website Slideshow/New Website Slideshow 1 Error Report Traceback (most recent call last): File "/home/frappe/frappe-bench/apps/frappe/frappe/desk/form/save.py", line 22, in savedocs doc.save() File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 260, in save return self._save(*args, kwargs) File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 283, in _save self.insert() File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 222, in insert self.run_before_save_methods() File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 869, in run_before_save_methods self.run_method("validate") File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 765, in run_method out = Document.hook(fn)(self, *args, *kwargs) File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 1041, in composer return composed(self, method, args, kwargs) File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 1024, in runner add_to_return_value(self, fn(self, *args, kwargs)) File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 759, in fn = lambda self, *args, *kwargs: getattr(self, method)(args, kwargs) File "/home/frappe/frappe-bench/apps/frappe/frappe/website/doctype/website_slideshow/website_slideshow.py", line 14, in validate self.validate_images() File "/home/frappe/frappe-bench/apps/frappe/frappe/website/doctype/website_slideshow/website_slideshow.py", line 25, in validate_images result = frappe.get_all("File", filters={ "file_url":("in", files) }, fields="is_private") File "/home/frappe/frappe-bench/apps/frappe/frappe/init.py", line 1262, in get_all return get_list(doctype, *args, *kwargs) File "/home/frappe/frappe-bench/apps/frappe/frappe/init.py", line 1235, in get_list return frappe.model.db_query.DatabaseQuery(doctype).execute(None, args, **kwargs) File "/home/frappe/frappe-bench/apps/frappe/frappe/model/db_query.py", line 87, in execute result = self.build_and_run() File "/home/frappe/frappe-bench/apps/frappe/frappe/model/db_query.py", line 99, in build_and_run args = self.prepare_args() File "/home/frappe/frappe-bench/apps/frappe/frappe/model/db_query.py", line 118, in prepare_args self.build_conditions() File "/home/frappe/frappe-bench/apps/frappe/frappe/model/db_query.py", line 287, in build_conditions self.build_filter_conditions(self.filters, self.conditions) File "/home/frappe/frappe-bench/apps/frappe/frappe/model/db_query.py", line 308, in build_filter_conditions conditions.append(self.prepare_filter_condition(f)) File "/home/frappe/frappe-bench/apps/frappe/frappe/model/db_query.py", line 366, in prepare_filter_condition values = values.split(",") AttributeError: 'map' object has no attribute 'split'

Traceback (most recent call last): File "/home/frappe/frappe-bench/apps/frappe/frappe/app.py", line 62, in application response = frappe.handler.handle() File "/home/frappe/frappe-bench/apps/frappe/frappe/handler.py", line 22, in handle data = execute_cmd(cmd) File "/home/frappe/frappe-bench/apps/frappe/frappe/handler.py", line 57, in execute_cmd return frappe.call(method, frappe.form_dict) File "/home/frappe/frappe-bench/apps/frappe/frappe/init.py", line 1007, in call return fn(*args, *newargs) File "/home/frappe/frappe-bench/apps/frappe/frappe/desk/form/save.py", line 22, in savedocs doc.save() File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 260, in save return self._save(args, kwargs) File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 283, in _save self.insert() File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 222, in insert self.run_before_save_methods() File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 869, in run_before_save_methods self.run_method("validate") File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 765, in run_method out = Document.hook(fn)(self, *args, kwargs) File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 1041, in composer return composed(self, method, *args, *kwargs) File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 1024, in runner add_to_return_value(self, fn(self, args, kwargs)) File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 759, in fn = lambda self, *args, kwargs: getattr(self, method)(*args, *kwargs) File "/home/frappe/frappe-bench/apps/frappe/frappe/website/doctype/website_slideshow/website_slideshow.py", line 14, in validate self.validate_images() File "/home/frappe/frappe-bench/apps/frappe/frappe/website/doctype/website_slideshow/website_slideshow.py", line 25, in validate_images result = frappe.get_all("File", filters={ "file_url":("in", files) }, fields="is_private") File "/home/frappe/frappe-bench/apps/frappe/frappe/init.py", line 1262, in get_all return get_list(doctype, args, kwargs) File "/home/frappe/frappe-bench/apps/frappe/frappe/init.py", line 1235, in get_list return frappe.model.db_query.DatabaseQuery(doctype).execute(None, *args, **kwargs) File "/home/frappe/frappe-bench/apps/frappe/frappe/model/db_query.py", line 87, in execute result = self.build_and_run() File "/home/frappe/frappe-bench/apps/frappe/frappe/model/db_query.py", line 99, in build_and_run args = self.prepare_args() File "/home/frappe/frappe-bench/apps/frappe/frappe/model/db_query.py", line 118, in prepare_args self.build_conditions() File "/home/frappe/frappe-bench/apps/frappe/frappe/model/db_query.py", line 287, in build_conditions self.build_filter_conditions(self.filters, self.conditions) File "/home/frappe/frappe-bench/apps/frappe/frappe/model/db_query.py", line 308, in build_filter_conditions conditions.append(self.prepare_filter_condition(f)) File "/home/frappe/frappe-bench/apps/frappe/frappe/model/db_query.py", line 366, in prepare_filter_condition values = values.split(",") AttributeError: 'map' object has no attribute 'split' Request Data { "type": "POST", "args": { "doc": "{\"docstatus\":0,\"doctype\":\"Website Slideshow\",\"name\":\"New Website Slideshow 1\",\"islocal\":1,\"unsaved\":1,\"owner\":\"Administrator\",\"header\":\"\",\"slideshow_name\":\"test\"}", "action": "Save", "cmd": "frappe.desk.form.save.savedocs" }, "btn": { "jQuery22400145784932950558941": { "events": { "click": [ { "type": "click", "origType": "click", "guid": 3230, "namespace": "" } ] } } }, "freeze": true, "url": "/" } Response JSON { "_server_messages": "[\"{\\"message\\": \\"Did not save\\"}\"]" }

crescent28 commented 5 years ago

Hello,

Tried to replicate the issue and created a slideshow. The slideshow worked in the following version:

ERPNext: v10.1.68 (master) Frappe Framework: v10.1.59 (master)