Issue 10 in pyactiveresource: Saving an array of dicts fails

8 views
Skip to first unread message

codesite...@google.com

unread,
Nov 9, 2009, 11:31:35 AM11/9/09
to pyactive...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 10 by josh.rickard: Saving an array of dicts fails
http://code.google.com/p/pyactiveresource/issues/detail?id=10

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.

Attachments:
patch.diff 840 bytes

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

codesite...@google.com

unread,
Nov 9, 2009, 11:38:42 AM11/9/09
to pyactive...@googlegroups.com

Comment #1 on issue 10 by josh.rickard: Saving an array of dicts fails
http://code.google.com/p/pyactiveresource/issues/detail?id=10

Oops, had some whitespace issues in the original attachment.

Attachments:
patch.diff 836 bytes

codesite...@google.com

unread,
Nov 17, 2009, 4:01:16 PM11/17/09
to pyactive...@googlegroups.com
Updates:
Status: Fixed

Comment #2 on issue 10 by mark.r.roach: Saving an array of dicts fails
http://code.google.com/p/pyactiveresource/issues/detail?id=10

Hi, Josh. Thanks for the patch. I have applied it along with some tests for
this case.
Reply all
Reply to author
Forward
0 new messages