Bug #2354
GMN create requires serialVersion to be present in system metadata
100%
Description
serialVersion in system metadata is an optional element for user generated system metadata being added to a member node through the create() method. GMN create fails with the following error (apparently due to an internal database constraint violation):
<?xml version="1.0" ?>Traceback (most recent call last):
File "/var/local/dataone/mn_generic/service/../service/mn/middleware/view_handler.py", line 92, in process_view
response = view_func(request, *view_args, **view_kwargs)
File "/var/local/dataone/mn_generic/service/../service/mn/views/v1.py", line 100, in object_no_pid
return object_post(request)
File "/var/local/dataone/mn_generic/service/../service/mn/views/v1.py", line 538, in object_post
return _create(request, pid)
File "/var/local/dataone/mn_generic/service/../service/mn/views/v1.py", line 636, in _create
object.save_unique()
File "/var/local/dataone/mn_generic/service/./mn/models.py", line 96, in save_unique
self.save()
File "/usr/local/lib/python2.6/dist-packages/django/db/models/base.py", line 460, in save
self.save_base(using=using, force_insert=force_insert, force_update=force_update)
File "/usr/local/lib/python2.6/dist-packages/django/db/models/base.py", line 553, in save_base
result = manager._insert(values, return_id=update_pk, using=using)
File "/usr/local/lib/python2.6/dist-packages/django/db/models/manager.py", line 195, in _insert
return insert_query(self.model, values, **kwargs)
File "/usr/local/lib/python2.6/dist-packages/django/db/models/query.py", line 1436, in insert_query
return query.get_compiler(using=using).execute_sql(return_id)
File "/usr/local/lib/python2.6/dist-packages/django/db/models/sql/compiler.py", line 791, in execute_sql
cursor = super(SQLInsertCompiler, self).execute_sql(None)
File "/usr/local/lib/python2.6/dist-packages/django/db/models/sql/compiler.py", line 735, in execute_sql
cursor.execute(sql, params)
File "/usr/local/lib/python2.6/dist-packages/django/db/backends/util.py", line 34, in execute
return self.cursor.execute(sql, params)
File "/usr/local/lib/python2.6/dist-packages/django/db/backends/postgresql_psycopg2/base.py", line 44, in execute
return self.cursor.execute(query, args)
IntegrityError: null value in column "serial_version" violates not-null constraint
view_handler.py(92)
v1.py(100)
v1.py(538)
v1.py(636)
models.py(96)
base.py(460)
base.py(553)
manager.py(195)
query.py(1436)
compiler.py(791)
compiler.py(735)
util.py(34)
base.py(44)
Type: <class 'django.db.utils.IntegrityError'>
Value: null value in column "serial_version" violates not-null constraint
History
#1 Updated by Dave Vieglais almost 13 years ago
- Target version changed from Sprint-2012.07-Block.1.4 to Sprint-2012.09-Block.2.1
- Position set to 2
#2 Updated by Dave Vieglais almost 13 years ago
- Target version changed from Sprint-2012.09-Block.2.1 to Sprint-2012.11-Block.2.2
- Position deleted (
52) - Position set to 5
#3 Updated by Roger Dahl over 12 years ago
- Status changed from New to Closed