Skip to content

Commit

Permalink
Bugfix: Allow lat/lon to be zero
Browse files Browse the repository at this point in the history
  • Loading branch information
clampr committed May 7, 2024
1 parent 95e09c8 commit 0048676
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion server/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"""

__appname__ = 'server'
__version__ = '0.0.12'
__version__ = '0.0.13'

import warnings
from flask import Flask, request
Expand Down
2 changes: 1 addition & 1 deletion server/endpoints/point/daily.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def point_daily():
args = utils.get_parameters(parameters)

# Check if required parameters are set
if args['lat'] and args['lon'] and len(
if 'lat' in args and 'lon' in args and len(
args['start']) == 10 and len(args['end']) == 10:

try:
Expand Down
2 changes: 1 addition & 1 deletion server/endpoints/point/hourly.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def point_hourly():
args = utils.get_parameters(parameters)

# Check if required parameters are set
if args['lat'] and args['lon'] and len(
if 'lat' in args and 'lon' in args and len(
args['start']) == 10 and len(args['end']) == 10:

try:
Expand Down
2 changes: 1 addition & 1 deletion server/endpoints/point/monthly.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def point_monthly():
args = utils.get_parameters(parameters)

# Check if required parameters are set
if args['lat'] and args['lon'] and len(
if 'lat' in args and 'lon' in args and len(
args['start']) == 10 and len(args['end']) == 10:

try:
Expand Down
2 changes: 1 addition & 1 deletion server/endpoints/point/normals.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def point_normals():
args = utils.get_parameters(parameters)

# Check if required parameters are set
if args['lat'] and args['lon']:
if 'lat' in args and 'lon' in args:

try:

Expand Down
2 changes: 1 addition & 1 deletion server/endpoints/stations/nearby.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def stations_nearby():
args = utils.get_parameters(parameters)

# Check if required parameters are set
if args['lat'] and args['lon']:
if 'lat' in args and 'lon' in args:

try:

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# Setup
setup(
name='meteostat-server',
version='0.0.12',
version='0.0.13',
author='Meteostat',
author_email='[email protected]',
description='Run a Meteostat JSON API server anywhere.',
Expand Down

0 comments on commit 0048676

Please sign in to comment.