Revised the documentation of the new_id function.
This commit is contained in:
parent
8c58a9083a
commit
0bc9947234
@ -26,10 +26,10 @@ from accounting import db
|
|||||||
|
|
||||||
|
|
||||||
def new_id(cls: Type[db.Model]):
|
def new_id(cls: Type[db.Model]):
|
||||||
"""Returns a new random ID for the data model.
|
"""Generates and returns a new, unused random ID for the data model.
|
||||||
|
|
||||||
:param cls: The data model.
|
:param cls: The data model.
|
||||||
:return: The generated new random ID.
|
:return: The newly-generated, unused random ID.
|
||||||
"""
|
"""
|
||||||
while True:
|
while True:
|
||||||
obj_id: int = 100000000 + randbelow(900000000)
|
obj_id: int = 100000000 + randbelow(900000000)
|
||||||
|
Loading…
Reference in New Issue
Block a user