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