Skip to content

Commit

Permalink
Convert for integer comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
francbartoli committed Apr 3, 2019
1 parent f3c799d commit 4a2f839
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions geonode/geoserver/upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,8 @@ def geoserver_upload(
if _native_bbox and len(_native_bbox) >= 5 and _native_bbox[4:5][0] == 'EPSG:4326':
box = _native_bbox[:4]
minx, maxx, miny, maxy = [float(a) for a in box]
if -180 <= minx <= 180 and -180 <= maxx <= 180 and \
- 90 <= miny <= 90 and -90 <= maxy <= 90:
if -180 <= int(minx) <= 180 and -180 <= int(maxx) <= 180 and \
-90 <= int(miny) <= 90 and -90 <= int(maxy) <= 90:
logger.info('GeoServer failed to detect the projection for layer '
'[%s]. Guessing EPSG:4326', name)
# If GeoServer couldn't figure out the projection, we just
Expand Down

0 comments on commit 4a2f839

Please sign in to comment.