bikalims / bika.lims

Open Source Web-based Laboratory Information Management System
http://www.bikalims.org
Other
223 stars 168 forks source link

IDServer doesn't find next correct sequence after flush #2315

Closed mikejmets closed 6 years ago

mikejmets commented 6 years ago

Description of the issue/feature this PR addresses

The ID Server does not find the next correct sequence after flushing the number generator

Linked issue: https://github.com/bikalims/bika.lims/issues/2314

Current behavior before PR

For a ID Template that has multiple segments, after a flush, the wrong sequence is returned

Desired behavior after PR is merged

Calculate the next sequence number correctly.

I confirm I have tested this PR thoroughly and coded it according to PEP8 standards.