nickesk / pyactiveresource

Automatically exported from code.google.com/p/pyactiveresource
Other
0 stars 0 forks source link

Saving an array of dicts fails #10

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. attempt to save an active resource object that has an array of dict 
objects:

record.some_value = [{"x": 1, "y": 2}, {"x": 3, "y": 4}]
record.save
>> errors out because pyactiveresource tries to run to_dict on a dict

What is the expected output? What do you see instead?
It should save without errors.

What version of the product are you using? On what operating system?
OSX, Ubuntu

I'm very new to python but I've attached a patch that has worked for me.  
I'm sure it could be re-written with more elegance.

Original issue reported on code.google.com by josh.ric...@gmail.com on 9 Nov 2009 at 4:30

Attachments:

GoogleCodeExporter commented 9 years ago
Oops, had some whitespace issues in the original attachment.

Original comment by josh.ric...@gmail.com on 9 Nov 2009 at 4:37

Attachments:

GoogleCodeExporter commented 9 years ago
Hi, Josh. Thanks for the patch. I have applied it along with some tests for 
this case.

Original comment by mark.r.r...@gmail.com on 17 Nov 2009 at 9:00