@@ -103,7 +103,7 @@ def _append_view_filters(self, params):
103103
104104
105105class CSVRequestOptions (_FilterOptionsBase ):
106- def __init__ (self , maxage = None ):
106+ def __init__ (self , maxage = - 1 ):
107107 super (CSVRequestOptions , self ).__init__ ()
108108 self .max_age = maxage
109109
@@ -112,13 +112,13 @@ def max_age(self):
112112 return self ._max_age
113113
114114 @max_age .setter
115- @property_is_int (range = (0 , 240 ))
115+ @property_is_int (range = (0 , 240 ), allowed = [ - 1 ] )
116116 def max_age (self , value ):
117117 self ._max_age = value
118118
119119 def apply_query_params (self , url ):
120120 params = []
121- if self .max_age != 0 :
121+ if self .max_age != - 1 :
122122 params .append ('maxAge={0}' .format (self .max_age ))
123123
124124 self ._append_view_filters (params )
@@ -130,7 +130,7 @@ class ImageRequestOptions(_FilterOptionsBase):
130130 class Resolution :
131131 High = 'high'
132132
133- def __init__ (self , imageresolution = None , maxage = None ):
133+ def __init__ (self , imageresolution = None , maxage = - 1 ):
134134 super (ImageRequestOptions , self ).__init__ ()
135135 self .image_resolution = imageresolution
136136 self .max_age = maxage
@@ -140,15 +140,15 @@ def max_age(self):
140140 return self ._max_age
141141
142142 @max_age .setter
143- @property_is_int (range = (0 , 240 ))
143+ @property_is_int (range = (0 , 240 ), allowed = [ - 1 ] )
144144 def max_age (self , value ):
145145 self ._max_age = value
146146
147147 def apply_query_params (self , url ):
148148 params = []
149149 if self .image_resolution :
150150 params .append ('resolution={0}' .format (self .image_resolution ))
151- if self .max_age != 0 :
151+ if self .max_age != - 1 :
152152 params .append ('maxAge={0}' .format (self .max_age ))
153153
154154 self ._append_view_filters (params )
@@ -176,7 +176,7 @@ class Orientation:
176176 Portrait = "portrait"
177177 Landscape = "landscape"
178178
179- def __init__ (self , page_type = None , orientation = None , maxage = 0 ):
179+ def __init__ (self , page_type = None , orientation = None , maxage = - 1 ):
180180 super (PDFRequestOptions , self ).__init__ ()
181181 self .page_type = page_type
182182 self .orientation = orientation
@@ -187,7 +187,7 @@ def max_age(self):
187187 return self ._max_age
188188
189189 @max_age .setter
190- @property_is_int (range = (0 , 240 ))
190+ @property_is_int (range = (0 , 240 ), allowed = [ - 1 ] )
191191 def max_age (self , value ):
192192 self ._max_age = value
193193
@@ -199,7 +199,7 @@ def apply_query_params(self, url):
199199 if self .orientation :
200200 params .append ('orientation={0}' .format (self .orientation ))
201201
202- if self .max_age != 0 :
202+ if self .max_age != - 1 :
203203 params .append ('maxAge={0}' .format (self .max_age ))
204204
205205 self ._append_view_filters (params )
0 commit comments