Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions DB/NEW_KT_DB/DataAccess/ObjectManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,3 +110,14 @@ def convert_object_attributes_to_dictionary(**kwargs):
dict[key] = value

return dict

def is_exists(self, object):
table_name = convert_object_name_to_management_table_name(object.object_name)
try:
query=f'select * from {table_name} where {object.pk_column} = {object.pk_value}'
result=self.db_manager.execute_query_with_single_result(query)
if result is None:
return False
return True
except sqlite3.OperationalError as e:
return False