Files
Assemblr-Backend/scanner/utils.py
2023-10-12 23:51:14 +03:00

10 lines
232 B
Python

from scanner.enums import CodeType
def guess_code_type(string_value: str) -> CodeType:
if string_value.isdigit():
return CodeType.BARCODE
if string_value:
return CodeType.QRCODE
return CodeType.INVALID