Open fenekku opened 4 years ago
Because our MethodViews use this pattern:
return self.response_handler.make_item_response( *self.resource.create(*args, **kwargs) )
self.resource.create needs to return a tuple. We should mimic Flask further and allow single value OR tuple.
Without this change, the developer needs to return a tuple in their Resource method which might lead to code like:
def get(self): return [],
just to satisfy that need. The comma could subsequently be deleted by accident and subtly break the code.
Because our MethodViews use this pattern:
self.resource.create needs to return a tuple. We should mimic Flask further and allow single value OR tuple.
Without this change, the developer needs to return a tuple in their Resource method which might lead to code like:
just to satisfy that need. The comma could subsequently be deleted by accident and subtly break the code.