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