Renamed the variable in the new_id function from "new" to "obj_id", to be clear.
This commit is contained in:
parent
4aed2f6ba7
commit
d368c5e062
@ -32,6 +32,6 @@ def new_id(cls: t.Type):
|
|||||||
:return: The generated new random ID.
|
:return: The generated new random ID.
|
||||||
"""
|
"""
|
||||||
while True:
|
while True:
|
||||||
new: int = 100000000 + randbelow(900000000)
|
obj_id: int = 100000000 + randbelow(900000000)
|
||||||
if db.session.get(cls, new) is None:
|
if db.session.get(cls, obj_id) is None:
|
||||||
return new
|
return obj_id
|
||||||
|
Loading…
Reference in New Issue
Block a user