Skip to content

Commit c468876

Browse files
author
Joel Collins
committed
Fix generated class methods not updating
1 parent 8be06af commit c468876

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

labthings/server/view/builder.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,11 @@ def _put(self, args):
5454
# Override read-write capabilities
5555
if not readonly:
5656
generated_class.post = _post
57+
generated_class.methods.add("POST")
5758
# Enable PUT requests for dictionaries
5859
if type(getattr(property_object, property_name)) == dict:
5960
generated_class.put = _put
61+
generated_class.methods.add("PUT")
6062

6163
# Add decorators for arguments etc
6264
initial_property_value = getattr(property_object, property_name)

0 commit comments

Comments
 (0)