We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
django==1.11.7 django-geoposition==0.3.0
models
class Company(models.Model): ... position = GeopositionField()
In the shell I did
shell
comp = Company(name='El Corporation', number='111', country='TH', position=GeopositionField(37, -112))
It is fine except when I commit to database
--------------------------------------------------------------------------- DataError Traceback (most recent call last) ~/.pyenv/versions/poink/lib/python3.6/site-packages/django/db/backends/utils.py in execute(self, sql, params) 64 else: ---> 65 return self.cursor.execute(sql, params) 66 DataError: value too long for type character varying(42) The above exception was the direct cause of the following exception: DataError Traceback (most recent call last) <ipython-input-14-7c47c29d69ab> in <module>() ----> 1 comp.save() ~/.pyenv/versions/poink/lib/python3.6/site-packages/django/db/models/base.py in save(self, force_insert, force_update, using, update_fields) 806 807 self.save_base(using=using, force_insert=force_insert, --> 808 force_update=force_update, update_fields=update_fields) 809 save.alters_data = True 810 ~/.pyenv/versions/poink/lib/python3.6/site-packages/django/db/models/base.py in save_base(self, raw, force_insert, force_update, using, update_fields) 836 if not raw: 837 self._save_parents(cls, using, update_fields) --> 838 updated = self._save_table(raw, cls, force_insert, force_update, using, update_fields) 839 # Store the database on which the object was saved 840 self._state.db = using ~/.pyenv/versions/poink/lib/python3.6/site-packages/django/db/models/base.py in _save_table(self, raw, cls, force_insert, force_update, using, update_fields) 922 923 update_pk = meta.auto_field and not pk_set --> 924 result = self._do_insert(cls._base_manager, using, fields, update_pk, raw) 925 if update_pk: 926 setattr(self, meta.pk.attname, result) ~/.pyenv/versions/poink/lib/python3.6/site-packages/django/db/models/base.py in _do_insert(self, manager, using, fields, update_pk, raw) 961 """ 962 return manager._insert([self], fields=fields, return_id=update_pk, --> 963 using=using, raw=raw) 964 965 def delete(self, using=None, keep_parents=False): ~/.pyenv/versions/poink/lib/python3.6/site-packages/django/db/models/manager.py in manager_method(self, *args, **kwargs) 83 def create_method(name, method): 84 def manager_method(self, *args, **kwargs): ---> 85 return getattr(self.get_queryset(), name)(*args, **kwargs) 86 manager_method.__name__ = method.__name__ 87 manager_method.__doc__ = method.__doc__ ~/.pyenv/versions/poink/lib/python3.6/site-packages/django/db/models/query.py in _insert(self, objs, fields, return_id, raw, using) 1074 query = sql.InsertQuery(self.model) 1075 query.insert_values(fields, objs, raw=raw) -> 1076 return query.get_compiler(using=using).execute_sql(return_id) 1077 _insert.alters_data = True 1078 _insert.queryset_only = False ~/.pyenv/versions/poink/lib/python3.6/site-packages/django/db/models/sql/compiler.py in execute_sql(self, return_id) 1105 with self.connection.cursor() as cursor: 1106 for sql, params in self.as_sql(): -> 1107 cursor.execute(sql, params) 1108 if not (return_id and cursor): 1109 return ~/.pyenv/versions/poink/lib/python3.6/site-packages/django/db/backends/utils.py in execute(self, sql, params) 78 start = time() 79 try: ---> 80 return super(CursorDebugWrapper, self).execute(sql, params) 81 finally: 82 stop = time() ~/.pyenv/versions/poink/lib/python3.6/site-packages/django/db/backends/utils.py in execute(self, sql, params) 63 return self.cursor.execute(sql) 64 else: ---> 65 return self.cursor.execute(sql, params) 66 67 def executemany(self, sql, param_list): ~/.pyenv/versions/poink/lib/python3.6/site-packages/django/db/utils.py in __exit__(self, exc_type, exc_value, traceback) 92 if dj_exc_type not in (DataError, IntegrityError): 93 self.wrapper.errors_occurred = True ---> 94 six.reraise(dj_exc_type, dj_exc_value, traceback) 95 96 def __call__(self, func): ~/.pyenv/versions/poink/lib/python3.6/site-packages/django/utils/six.py in reraise(tp, value, tb) 683 value = tp() 684 if value.__traceback__ is not tb: --> 685 raise value.with_traceback(tb) 686 raise value 687 ~/.pyenv/versions/poink/lib/python3.6/site-packages/django/db/backends/utils.py in execute(self, sql, params) 63 return self.cursor.execute(sql) 64 else: ---> 65 return self.cursor.execute(sql, params) 66 67 def executemany(self, sql, param_list): DataError: value too long for type character varying(42)
The text was updated successfully, but these errors were encountered:
i got the same issue #98
Sorry, something went wrong.
No branches or pull requests
django==1.11.7
django-geoposition==0.3.0
models
In the
shell
I didIt is fine except when I commit to database
The text was updated successfully, but these errors were encountered: