Rework of GeoRide objects and add missing fields on Traker
This commit is contained in:
13
georideapilib/objects/JsonMgtMetaClass.py
Normal file
13
georideapilib/objects/JsonMgtMetaClass.py
Normal file
@@ -0,0 +1,13 @@
|
||||
"""
|
||||
Georide objects implementation
|
||||
@author Matthieu DUVAL <matthieu@duval-dev.fr>
|
||||
"""
|
||||
import time
|
||||
import logging
|
||||
|
||||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
class JsonMgtMetaClass(type):
|
||||
@staticmethod
|
||||
def json_field_protect(json, field_name, default_value = None):
|
||||
return json[field_name] if field_name in json.keys() else default_value
|
||||
Reference in New Issue
Block a user