pepijn Posted September 17, 2013 Report Share Posted September 17, 2013 So i have this service blesta.command('services/get', {'service_id': 12}) {'response': {'client_id': '2', 'coupon_id': None, 'date_added': '2013-09-16 12:09:11', 'date_canceled': None, 'date_last_renewed': None, 'date_renews': '2013-10-16 12:09:11', 'date_suspended': None, 'fields': [{'encrypted': '0', 'key': 'DomainName', 'serialized': '0', 'value': 'fu.ga'}], 'id': '12', 'id_code': '12', 'id_format': '{num}', 'id_value': '12', 'module_row_id': None, 'name': 'fu.ga', 'package': {'company_id': '1', 'description': '', 'description_html': '', 'id': '1', 'id_format': '{num}', 'id_value': '1', 'module_group': None, 'module_id': '1', 'module_row': '0', 'name': 'Free domains', 'qty': '87', 'status': 'active', 'taxable': '0'}, 'package_group_id': None, 'package_pricing': {'cancel_fee': '0.0000', 'currency': 'USD', 'id': '1', 'package_id': '1', 'period': 'month', 'price': '0.0000', 'setup_fee': '0.0000', 'term': '1'}, 'parent_service_id': None, 'pricing_id': '1', 'qty': '1', 'status': 'active'}} But I'm trying to look it up by the DomainName blesta.command('services/searchServiceFields', {'module_id': 1, 'key': 'DomainName', 'value': 'fu.ga'}) [] The above code is using a Python wrapper for the API. Quote Link to comment Share on other sites More sharing options...
Tyson Posted September 17, 2013 Report Share Posted September 17, 2013 So i have this service blesta.command('services/get', {'service_id': 12}) {'response': {'client_id': '2', 'coupon_id': None, 'date_added': '2013-09-16 12:09:11', 'date_canceled': None, 'date_last_renewed': None, 'date_renews': '2013-10-16 12:09:11', 'date_suspended': None, 'fields': [{'encrypted': '0', 'key': 'DomainName', 'serialized': '0', 'value': 'fu.ga'}], 'id': '12', 'id_code': '12', 'id_format': '{num}', 'id_value': '12', 'module_row_id': None, 'name': 'fu.ga', 'package': {'company_id': '1', 'description': '', 'description_html': '', 'id': '1', 'id_format': '{num}', 'id_value': '1', 'module_group': None, 'module_id': '1', 'module_row': '0', 'name': 'Free domains', 'qty': '87', 'status': 'active', 'taxable': '0'}, 'package_group_id': None, 'package_pricing': {'cancel_fee': '0.0000', 'currency': 'USD', 'id': '1', 'package_id': '1', 'period': 'month', 'price': '0.0000', 'setup_fee': '0.0000', 'term': '1'}, 'parent_service_id': None, 'pricing_id': '1', 'qty': '1', 'status': 'active'}} I think the problem is that the service's module_row_id is invalid, as it should be an integer representing the module row of the module the service was created for. It seems like one of the following may have occurred when you created the service: You didn't set a module_row_id The package didn't have a valid module_row set (I see it's 0 above) The module you're using did not return the module row when fetching it based on the package module group in Module::selectModuleRow() Looks like #3 would be why. Quote Link to comment Share on other sites More sharing options...
pepijn Posted September 18, 2013 Author Report Share Posted September 18, 2013 Ok thanks. I modified the Namecheap module, but managed to break it in a subtle way so that no module_row_id was given. Quote Link to comment Share on other sites More sharing options...
Tyson Posted September 18, 2013 Report Share Posted September 18, 2013 That'd do it. Glad you were able to figure it out though. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.