Skip to content

Commit

Permalink
Prepare for rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
ziv17 committed Dec 2, 2023
1 parent aa54010 commit a3c91e8
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ develop-eggs
lib
lib64

# newsflash-ifografics
anyway-newsflash-infographics/anyway-newsflash-infographics/

# Installer logs
pip-log.txt

Expand Down
4 changes: 2 additions & 2 deletions alembic/versions/7ea883c8a245_add_road_junction_km_table.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
"""add suburban junction table
Revision ID: 7ea883c8a245
Revises: d9cb98c752d4
Revises: 664f8a93794e
Create Date: 2023-06-04 17:43:13.170728
"""

# revision identifiers, used by Alembic.
revision = '7ea883c8a245'
down_revision = 'd9cb98c752d4'
down_revision = '664f8a93794e'
branch_labels = None
depends_on = None

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,4 +144,4 @@ def localize_items(request_params: RequestParams, items: Dict) -> Dict:
_("one severe injured")
_("severe injured plural")
_("one light injured")
_("light injured plural")
_("light injured plural")
8 changes: 5 additions & 3 deletions anyway/widgets/widget_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,16 @@ def get_expression_for_segment_junctions(segment_id: int, table_obj):


def get_filter_expression(table_obj, field_name, value):
if field_name == "street1_hebrew":
if field_name == "street1_hebrew" or field_name == "street1":
if isinstance(value, list):
values = value
else:
values = [value]
o = or_(
(getattr(table_obj, "street1_hebrew")).in_(values),
(getattr(table_obj, "street2_hebrew")).in_(values),
(getattr(table_obj, field_name)).in_(values),
(getattr(table_obj, field_name.replace("1", "2"))).in_(values),
# (getattr(table_obj, "street1_hebrew")).in_(values),
# (getattr(table_obj, "street2_hebrew")).in_(values),
)
else:
if isinstance(value, list):
Expand Down

0 comments on commit a3c91e8

Please sign in to comment.