This repository was archived by the owner on Nov 3, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 69
This repository was archived by the owner on Nov 3, 2025. It is now read-only.
Long search field causing error in search_maintenance #310
Copy link
Copy link
Open
Description
Describe the bug
A clear and concise description of what the bug is.
Running a Centos 7 deployment I run into an issue when trying to run search_maintenance.
django.db.utils.DataError: value too long for type character varying(254)
To Reproduce
Steps to reproduce the behavior:
- su - saluser
- cd sal_env
- source bin/activate
- cd sal
- python2.7 manage.py search_maintenance
- See error
/srv/saluser/sal_env/lib/python2.7/site-packages/django/db/models/fields/__init__.py:1430: RuntimeWarning: DateTimeField SavedSearch.created received a naive datetime (2018-11-27 18:39:34.789562) while time zone support is active.
RuntimeWarning)
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/srv/saluser/sal_env/lib/python2.7/site-packages/django/core/management/__init__.py", line 367, in execute_from_command_line
utility.execute()
File "/srv/saluser/sal_env/lib/python2.7/site-packages/django/core/management/__init__.py", line 359, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/srv/saluser/sal_env/lib/python2.7/site-packages/django/core/management/base.py", line 305, in run_from_argv
self.execute(*args, **cmd_options)
File "/srv/saluser/sal_env/lib/python2.7/site-packages/django/core/management/base.py", line 356, in execute
output = self.handle(*args, **options)
File "/srv/saluser/sal_env/sal/search/management/commands/search_maintenance.py", line 117, in handle
SearchFieldCache.objects.bulk_create(search_fields)
File "/srv/saluser/sal_env/lib/python2.7/site-packages/django/db/models/manager.py", line 85, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/srv/saluser/sal_env/lib/python2.7/site-packages/django/db/models/query.py", line 452, in bulk_create
ids = self._batched_insert(objs_without_pk, fields, batch_size)
File "/srv/saluser/sal_env/lib/python2.7/site-packages/django/db/models/query.py", line 1060, in _batched_insert
inserted_id = self._insert(item, fields=fields, using=self.db, return_id=True)
File "/srv/saluser/sal_env/lib/python2.7/site-packages/django/db/models/query.py", line 1043, in _insert
return query.get_compiler(using=using).execute_sql(return_id)
File "/srv/saluser/sal_env/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 1054, in execute_sql
cursor.execute(sql, params)
File "/srv/saluser/sal_env/lib/python2.7/site-packages/django/db/backends/utils.py", line 64, in execute
return self.cursor.execute(sql, params)
File "/srv/saluser/sal_env/lib/python2.7/site-packages/django/db/utils.py", line 94, in __exit__
six.reraise(dj_exc_type, dj_exc_value, traceback)
File "/srv/saluser/sal_env/lib/python2.7/site-packages/django/db/backends/utils.py", line 64, in execute
return self.cursor.execute(sql, params)
django.db.utils.DataError: value too long for type character varying(254)
Server (please complete the following information):
- Host environment [Centos 7. The environment is almost identical to https://github.com/salopensource/sal/wiki/RHEL-7 ]
- Version [Sal version 3.3.13.1621]
Client (please complete the following information):
Not affected.
Metadata
Metadata
Assignees
Labels
No labels