Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Req:deep_post_params() raise Error. #47

Open
dcy opened this issue Jun 18, 2015 · 1 comment
Open

Req:deep_post_params() raise Error. #47

dcy opened this issue Jun 18, 2015 · 1 comment

Comments

@dcy
Copy link

dcy commented Jun 18, 2015

Module: xyadmin_email_controller, Line: 22, 
My print's "Req : post_params ( )" is [{"title","dsfasdfasdf"},
                                       {"serverlists[]","2"},
                                       {"users",[]},
                                       {"content","asdfasdfasdf"},
                                       {"attachments[0][item_type]","1"},
                                       {"attachments[0][item_id]","1"},
                                       {"attachments[0][item_name]","1"},
                                       {"attachments[0][item_amount]","1"},
                                       {"attachments[1][item_type]","2"},
                                       {"attachments[1][item_id]","1"},
                                       {"attachments[1][item_name]","1"},
                                       {"attachments[1][item_amount]","1"}]

How can i get the "attachments"?
I tried Req:param_group("attachments[]"), Req:post_param("attachments"), Req:post_param_group("attachments[]")

Req:deep_post_params() and Req:deep_post_param("attachments") will raise Error:
[error] Error in controller error:{case_clause,nomatch} Stacktrace: [{simple_bridge_request_wrapper,parse_deep_post_params,3,[{file,"src/simple_bridge_request_wrapper.erl"},{line,148}]},{xyadmin_email_controller,send,4,[{file,"/home/dcy/xyadmin/src/controller/xyadmin_email_controller.erl"},{line,30}]},{boss_web_controller,call_controller_action,3,[{file,"src/boss/boss_web_controller.erl"},{line,316}]},{boss_web_controller,apply_action,4,[{file,"src/boss/boss_web_controller.erl"},{line,308}]},{boss_web_controller,execute_action_inner,9,[{file,"src/boss/boss_web_controller.erl"},{line,287}]},{boss_web_controller_handle_request,process_dynamic_request,5,[{file,"src/boss/boss_web_controller_handle_request.erl"},{line,254}]},{boss_web_controller_handle_request,process_request,5,[{file,"src/boss/boss_web_controller_handle_request.erl"},{line,240}]},{boss_web_controller_handle_request,set_timer,8,[{file,"src/boss/boss_web_controller_handle_request.erl"},{line,160}]}]

It also at ChicagoBoss/ChicagoBoss#576

@choptastic
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants