Skip to content
New issue

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

generate new nr number #1555

Merged
merged 3 commits into from
Jul 10, 2024
Merged

generate new nr number #1555

merged 3 commits into from
Jul 10, 2024

Conversation

eve-git
Copy link
Collaborator

@eve-git eve-git commented Jul 9, 2024

Issue #, if available:
bcgov/entity#21856

Description of changes:
Generate a new NR. The logic is the same as in Oracle package NRO_UTIL_PCG.get_new_nr_num

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the namex license (Apache 2.0).

Copy link
Collaborator

@EPortman EPortman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there might be a typo here.

if random_num < floor or random > ceiling:
         continue

Should this be random_num instead of random? Also is this check necessary as the random.randInt gets a random number already in this range?

Copy link
Collaborator

@EPortman EPortman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great!

@eve-git eve-git merged commit 0cebb83 into bcgov:main Jul 10, 2024
2 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants