Repository: frappe/frappe

Issue:
AttributeError: 'bool' object has no attribute 'fields_'
Getting this migrate error on the newest release; works fine with the previous release.

```
> bench --site my_site migrate
Migrating my_site
Executing execute:frappe.reload_doc('core', 'doctype', 'doctype') in my_site (_c0bc0e8af8edb577)
Success: Done in 0.821s
Executing execute:frappe.reload_doc("erpnext_integrations", "doctype", "TaxJar Settings") in my_site (_c0bc0e8af8edb577)
Success: Done in 0.451s
Executing execute:frappe.reload_doc("erpnext_integrations", "doctype", "Product Tax Category") in my_site (_c0bc0e8af8edb577)
/home/frappe/frappe-bench/apps/erpnext/erpnext/erpnext_integrations/doctype/product_tax_category/product_tax_category.json missing
Success: Done in 0.027s
Executing erpnext.patches.v13_0.custom_fields_for_taxjar_integration          #08-11-2021 in my_site (_c0bc0e8af8edb577)
Success: Done in 0.127s
Executing erpnext.patches.v13_0.update_job_card_status in my_site (_c0bc0e8af8edb577)
Success: Done in 0.057s
Executing erpnext.patches.v12_0.update_production_plan_status in my_site (_c0bc0e8af8edb577)
Success: Done in 0.597s
Executing erpnext.patches.v13_0.item_naming_series_not_mandatory in my_site (_c0bc0e8af8edb577)
Success: Done in 0.268s
Executing erpnext.patches.v13_0.update_category_in_ltds_certificate in my_site (_c0bc0e8af8edb577)
Success: Done in 0.058s
Executing erpnext.patches.v13_0.create_ksa_vat_custom_fields in my_site (_c0bc0e8af8edb577)
Success: Done in 0.076s
Updating DocTypes for frappe        : [========================================] 100%
Updating DocTypes for erpnext       : [========================================] 100%
Updating DocTypes for custom_app    : [========================================] 100%

Traceback (most recent call last):
  File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 104, in <module>
    main()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 19, in main
    click.Group(commands=commands)(prog_name='bench')
  File "/home/frappe/frappe-bench/env/lib/python3.6/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/home/frappe/frappe-bench/env/lib/python3.6/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/home/frappe/frappe-bench/env/lib/python3.6/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/frappe/frappe-bench/env/lib/python3.6/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/frappe/frappe-bench/env/lib/python3.6/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/frappe/frappe-bench/env/lib/python3.6/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/home/frappe/frappe-bench/env/lib/python3.6/site-packages/click/decorators.py", line 21, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/commands/__init__.py", line 27, in _func
    ret = f(frappe._dict(ctx.obj), *args, **kwargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/commands/site.py", line 309, in migrate
    skip_search_index=skip_search_index
  File "/home/frappe/frappe-bench/apps/frappe/frappe/migrate.py", line 75, in migrate
    sync_fixtures()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/fixtures.py", line 24, in sync_fixtures
    import_doc(frappe.get_app_path(app, "fixtures", fname))
  File "/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/data_import/data_import.py", line 191, in import_doc
    reset_permissions=True
  File "/home/frappe/frappe-bench/apps/frappe/frappe/modules/import_file.py", line 155, in import_file_by_path
    update_modified(new_modified_timestamp, doc)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/modules/import_file.py", line 189, in update_modified
    singles_table.field == "modified"
  File "/home/frappe/frappe-bench/env/lib/python3.6/site-packages/pypika/utils.py", line 50, in _copy
    result = func(self_copy, *args, **kwargs)
  File "/home/frappe/frappe-bench/env/lib/python3.6/site-packages/pypika/queries.py", line 928, in where
    if not self._validate_table(criterion):
  File "/home/frappe/frappe-bench/env/lib/python3.6/site-packages/pypika/queries.py", line 1153, in _validate_table
    for field in term.fields_():
AttributeError: 'bool' object has no attribute 'fields_'
```

The error happens while restoring **Website Settings** from fixtures of my_app.

### Version

erpnext 13.16.1
frappe 13.16.0


Discussion:

Resolving patch:
diff --git a/frappe/modules/import_file.py b/frappe/modules/import_file.py
--- a/frappe/modules/import_file.py
+++ b/frappe/modules/import_file.py
@@ -189,7 +189,7 @@ def update_modified(original_modified, doc):
 		).set(
 			singles_table.value,original_modified
 		).where(
-			singles_table.field == "modified"
+			singles_table["field"] == "modified",  # singles_table.field is a method of pypika Selectable
 		).where(
 			singles_table.doctype == doc["name"]
 		).run()


Test patch: