Skip to content

Commit

Permalink
fix query and db
Browse files Browse the repository at this point in the history
  • Loading branch information
RomanPorshnev committed Dec 21, 2024
1 parent c5cf4a3 commit 3ce5ba3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
4 changes: 2 additions & 2 deletions backend/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ def filter_toponyms(filters):
AND ($type IS NULL OR ANY(type_param IN $type WHERE type_param IN types))
AND ($architect IS NULL OR ANY(architect IN architects WHERE toLower(architect) CONTAINS toLower($architect)))
AND ($hasPhoto IS NULL OR hasPhotoFlag = $hasPhoto)
AND ($renamedDateFrom IS NULL OR ANY(year IN renameYears WHERE year >= $renamedDateFrom))
AND ($renamedDateTo IS NULL OR ANY(year IN renameYears WHERE year <= $renamedDateTo))
AND ($renamedDateFrom IS NULL OR ALL(year IN renameYears WHERE year >= $renamedDateFrom))
AND ($renamedDateTo IS NULL OR ALL(year IN renameYears WHERE year <= $renamedDateTo))
AND ($address IS NULL OR toLower(t.Address) CONTAINS toLower($address))
AND ($name IS NULL OR toLower(COALESCE(latestName, t.BriefDescription)) CONTAINS toLower($name))
AND ($cardSearch IS NULL OR (
Expand Down
7 changes: 2 additions & 5 deletions backend/db/toponyms_data.json
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,6 @@
"Гутцайт А. Д."
],
"photos": [
"https://www.citywalls.ru/photo125032.html"
],
"nameRecords": [
{
Expand Down Expand Up @@ -407,8 +406,8 @@
"Демченко Владимир Владимирович"
],
"photos": [
"https://www.citywalls.ru/photo75272.html",
"https://www.citywalls.ru/photo197901.html"
"https://p0.citywalls.ru/photo_73-75272.jpg?mt=1296559588",
"https://p1.citywalls.ru/photo_193-197901.jpg?mt=1405669784"
],
"nameRecords": [
{
Expand Down Expand Up @@ -447,8 +446,6 @@
"Шмидт Карл Карлович"
],
"photos": [
"https://www.citywalls.ru/photo633.html",
"https://www.citywalls.ru/photo634.html"
],
"nameRecords": [
{
Expand Down

0 comments on commit 3ce5ba3

Please sign in to comment.