@@ -167,7 +167,7 @@ def get_doctype_fields_meta(DocField, doctype, allowed_fieldtypes, restricted_fi
167
167
DocField .options ,
168
168
)
169
169
.where (DocField [parent ] == doctype )
170
- .where (DocField .hidden == False )
170
+ .where (DocField .hidden == False ) # noqa: E712
171
171
.where (Criterion .any ([DocField .fieldtype == i for i in allowed_fieldtypes ]))
172
172
.where (Criterion .all ([DocField .fieldname != i for i in restricted_fields ]))
173
173
.run (as_dict = True )
@@ -181,16 +181,17 @@ def get_quick_filters(doctype: str):
181
181
quick_filters = []
182
182
183
183
for field in fields :
184
- if field .fieldtype == "Select" :
185
- field .options = field .options .split ("\n " )
186
- field .options = [{"label" : option , "value" : option } for option in field .options ]
187
- field .options .insert (0 , {"label" : "" , "value" : "" })
184
+ options = field .options
185
+ if field .fieldtype == "Select" and options and isinstance (options , str ):
186
+ options = options .split ("\n " )
187
+ options = [{"label" : option , "value" : option } for option in options ]
188
+ options .insert (0 , {"label" : "" , "value" : "" })
188
189
quick_filters .append (
189
190
{
190
191
"label" : _ (field .label ),
191
192
"name" : field .fieldname ,
192
193
"type" : field .fieldtype ,
193
- "options" : field . options ,
194
+ "options" : options ,
194
195
}
195
196
)
196
197
@@ -278,7 +279,7 @@ def get_data(
278
279
columns = frappe .parse_json (list_view_settings .columns )
279
280
rows = frappe .parse_json (list_view_settings .rows )
280
281
is_default = False
281
- elif not custom_view or is_default and hasattr (_list , "default_list_data" ):
282
+ elif not custom_view or ( is_default and hasattr (_list , "default_list_data" ) ):
282
283
rows = default_rows
283
284
columns = _list .default_list_data ().get ("columns" )
284
285
@@ -341,7 +342,7 @@ def get_data(
341
342
for kc in kanban_columns :
342
343
column_filters = {column_field : kc .get ("name" )}
343
344
order = kc .get ("order" )
344
- if column_field in filters and filters .get (column_field ) != kc .name or kc .get ("delete" ):
345
+ if ( column_field in filters and filters .get (column_field ) != kc .name ) or kc .get ("delete" ):
345
346
column_data = []
346
347
else :
347
348
column_filters .update (filters .copy ())
0 commit comments