Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
danielhers committed Dec 27, 2017
2 parents 267b688 + 1561f10 commit efe60ad
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions anyway/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from .constants import CONST
from collections import namedtuple
from sqlalchemy import Column, Integer, String, Boolean, Float, ForeignKey, DateTime, Text, Index, desc, sql, Table, \
ForeignKeyConstraint, func
ForeignKeyConstraint, func, and_
from sqlalchemy.orm import relationship, load_only, backref
from .utilities import init_flask, decode_hebrew
from flask.ext.sqlalchemy import SQLAlchemy
Expand Down Expand Up @@ -335,12 +335,12 @@ def bounding_box_query(is_thin=False, yield_per=None, involved_and_vehicles=Fals
if kwargs['acctype'] <= 20:
markers = markers.filter(AccidentMarker.subtype == kwargs['acctype'])
elif kwargs['acctype'] == CONST.BIKE_ACCIDENTS_NO_CASUALTIES:
markers = markers.\
markers = markers.filter(and_(AccidentMarker.vehicles.any(), AccidentMarker.involved.any())).\
filter(AccidentMarker.vehicles.any(Vehicle.vehicle_type == CONST.VEHICLE_TYPE_BIKE)).group_by(AccidentMarker.id).\
having(~AccidentMarker.involved.\
any(Involved.involved_type != CONST.INVOLVED_TYPE_DRIVER_UNHARMED))
elif kwargs['acctype'] == CONST.BIKE_ACCIDENTS_WITH_CASUALTIES:
markers = markers. \
markers = markers.filter(and_(AccidentMarker.vehicles.any(), AccidentMarker.involved.any())).\
filter(AccidentMarker.vehicles.\
any(Vehicle.vehicle_type == CONST.VEHICLE_TYPE_BIKE)).group_by(AccidentMarker.id).\
having(AccidentMarker.involved.any(Involved.involved_type != CONST.INVOLVED_TYPE_DRIVER_UNHARMED))
Expand Down
2 changes: 1 addition & 1 deletion static/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -765,7 +765,7 @@ input[type='checkbox']{
#filter-string{
text-align: center;
vertical-align: middle;
padding-top: 10%; !important;
padding-top: 4% !important;
}

#filter-string > p{
Expand Down

0 comments on commit efe60ad

Please sign in to comment.