Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
API was only handling environment IP configurations in the case that …
…there was only 1 entry. Solved. /environment/configuration/list/120/ 335MEOBBSFWKD3JBR5VTBW ERROR - Erro não esperado. Traceback (most recent call last): File "/vagrant/networkapi/rest.py", line 88, in handle_request response = self.handle_get(request, user, args, **kwargs) File "/vagrant/networkapi/ambiente/resource/EnvironmentConfigurationListResource.py", line 52, in handle_get self.log.info("teste %s" % configurations_prefix) File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py", line 72, in __repr__ data = list(self[:REPR_OUTPUT_SIZE + 1]) File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py", line 87, in __len__ self._result_cache.extend(self._iter) File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py", line 291, in iterator for row in compiler.results_iter(): File "/usr/local/lib/python2.7/dist-packages/django/db/models/sql/compiler.py", line 763, in results_iter for rows in self.execute_sql(MULTI): File "/usr/local/lib/python2.7/dist-packages/django/db/models/sql/compiler.py", line 818, in execute_sql cursor.execute(sql, params) File "/usr/local/lib/python2.7/dist-packages/django/db/backends/util.py", line 40, in execute return self.cursor.execute(sql, params) File "/usr/local/lib/python2.7/dist-packages/django/db/backends/mysql/base.py", line 114, in execute return self.cursor.execute(query, args) File "/usr/local/lib/python2.7/dist-packages/MySQLdb/cursors.py", line 174, in execute self.errorhandler(self, exc, value) File "/usr/local/lib/python2.7/dist-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler raise errorclass, errorvalue DatabaseError: (1242, 'Subquery returns more than 1 row')
- Loading branch information