fixed the bitrange

This commit is contained in:
Hellow
2023-09-11 21:34:45 +02:00
parent 151cdf7831
commit 7758b82312
4 changed files with 12 additions and 12 deletions

View File

@@ -4,6 +4,7 @@ from typing import Optional, Dict, Tuple, List
from .metadata import Metadata
from .option import Options
from ..utils.shared import HIGHEST_ID
from ..utils.config import main_settings, logging_settings
@@ -28,7 +29,7 @@ class DatabaseObject:
64 bit integer, but this is defined in shared.py in ID_BITS
the range is defined in the Tuple ID_RANGE
"""
_id = random.randint(0, main_settings['id_bits'])
_id = random.randint(0, HIGHEST_ID)
self.automatic_id = True
LOGGER.debug(f"Id for {type(self).__name__} isn't set. Setting to {_id}")