mirror of
https://github.com/migatu/conjurer.git
synced 2026-07-14 21:38:38 +00:00
asa
This commit is contained in:
@@ -88,6 +88,7 @@ class Librarian(object):
|
||||
#Search sql for UUID
|
||||
#SQL SELECT * FROM RESULTS WHERE UUID = uuid
|
||||
uuid_found = False
|
||||
database = None
|
||||
with open("results.json", "r", encoding="UTF-8") as new_file:
|
||||
#tu logika komunikacji z SQL i cała logika związana z wyszukaniem
|
||||
#ale tymczasowo plik
|
||||
@@ -95,13 +96,14 @@ class Librarian(object):
|
||||
database = json.load(new_file)
|
||||
except JSONDecodeError:
|
||||
pass
|
||||
for item in database:
|
||||
if item["UUID"] == uuid:
|
||||
print (item["UUID"])
|
||||
uuid_found = True
|
||||
self.last_search = item
|
||||
if uuid_found:
|
||||
return self.last_search
|
||||
if database:
|
||||
for item in database:
|
||||
if item["UUID"] == uuid:
|
||||
print (item["UUID"])
|
||||
uuid_found = True
|
||||
self.last_search = item
|
||||
if uuid_found:
|
||||
return self.last_search
|
||||
self.search_crossref(query=query, uuid=uuid)
|
||||
return self.last_search
|
||||
|
||||
|
||||
Reference in New Issue
Block a user