Crash trying to set sequence's number_next to zero
Trying to set number_next to 0 or lower will cause the following crash:
Traceback (most recent call last):
File "/trytond/wsgi.py", line 114, in dispatch_request
return endpoint(request, **request.view_args)
File "/trytond/protocols/dispatcher.py", line 48, in rpc
request, database_name, *request.rpc_params)
File "/trytond/wsgi.py", line 81, in auth_required
return wrapped(*args, **kwargs)
File "/trytond/protocols/wrappers.py", line 131, in wrapper
return func(request, pool, *args, **kwargs)
File "/trytond/protocols/dispatcher.py", line 186, in _dispatch
result = rpc.result(meth(*c_args, **c_kwargs))
File "/trytond/ir/sequence.py", line 184, in write
sequence.update_sql_sequence(values.get('number_next'))
File "/trytond/ir/sequence.py", line 264, in update_sql_sequence
self._sql_sequence_name, self.number_increment, number_next)
File "/trytond/backend/postgresql/database.py", line 500, in sequence_update
(number_increment, start_value))
File "/trytond/backend/postgresql/database.py", line 68, in execute
cursor.execute(self, sql, args)
psycopg2.errors.InvalidParameterValue: RESTART value (0) cannot be less than MINVALUE (1)