Skip to content

Commit c3d6460

Browse files
committed
Add cooperativeWork prop to Task model
1 parent fe6755d commit c3d6460

1 file changed

Lines changed: 14 additions & 2 deletions

File tree

maproulette/models/task.py

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,19 @@ def mapillary_images(self):
153153
def mapillary_images(self, value):
154154
self._mapillary_images = value
155155

156+
@property
157+
def cooperative_work(self):
158+
"""A tag that is or will be used for a new type of task resolution"""
159+
return self._cooperative_work
160+
161+
@cooperative_work.setter
162+
def cooperative_work(self, value):
163+
self._cooperative_work = value
164+
156165
def __init__(self, name, parent, geometries, id=None, instruction=None, location=None, suggested_fix=None,
157166
status=None, mapped_on=None, review=None, priority=None, changeset_id=None,
158-
completion_responses=None, bundle_id=None, is_bundle_primary=None, mapillary_images=None):
167+
completion_responses=None, bundle_id=None, is_bundle_primary=None, mapillary_images=None,
168+
cooperative_work=None):
159169
self._id = id
160170
self._name = name
161171
self._parent = parent
@@ -172,6 +182,7 @@ def __init__(self, name, parent, geometries, id=None, instruction=None, location
172182
self._bundle_id = bundle_id
173183
self._is_bundle_primary = is_bundle_primary
174184
self._mapillary_images = mapillary_images
185+
self._cooperative_work = cooperative_work
175186

176187
def to_dict(self):
177188
"""Converts all non-null properties of a task object into a dictionary"""
@@ -190,7 +201,8 @@ def to_dict(self):
190201
"completionResponses": self._completion_responses,
191202
"bundleId": self._bundle_id,
192203
"isBundlePrimary": self._is_bundle_primary,
193-
"mapillaryImages": self._mapillary_images
204+
"mapillaryImages": self._mapillary_images,
205+
"cooperativeWork": self._cooperative_work
194206
}
195207
return {k: v for (k, v) in properties.items() if v is not None}
196208

0 commit comments

Comments
 (0)