chore: fix deepsource issues
* use set comprehension instead of generator * remove redundant else statement Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com>
This commit is contained in:
parent
a73be732fd
commit
2f821f9c2d
2 changed files with 2 additions and 3 deletions
|
|
@ -776,7 +776,7 @@ class Database(object):
|
|||
FROM information_schema.tables
|
||||
WHERE table_schema NOT IN ('pg_catalog', 'information_schema')
|
||||
""")
|
||||
tables = set(d[0] for d in table_rows)
|
||||
tables = {d[0] for d in table_rows}
|
||||
frappe.cache().set_value('db_tables', tables)
|
||||
return tables
|
||||
|
||||
|
|
|
|||
|
|
@ -138,8 +138,7 @@ class DBTable:
|
|||
if frappe.db.is_missing_column(e):
|
||||
# Unknown column 'column_name' in 'field list'
|
||||
continue
|
||||
else:
|
||||
raise
|
||||
raise
|
||||
|
||||
if max_length and max_length[0][0] and max_length[0][0] > new_length:
|
||||
if col.fieldname in self.columns:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue