Skip to content

Commit

Permalink
Fix for more complex formats
Browse files Browse the repository at this point in the history
  • Loading branch information
GustavAndreasson committed Dec 28, 2023
1 parent 3c1b8d0 commit f75af6e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion records/services/record.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ def __getFormats(format_data):
for format in format_data:
format_string = format.get("name")
if format.get("descriptions"):
desc = re.search('(\\d+)"|(LP)', " ".join(format.get("descriptions")))
desc = re.search(r'(\d[\d\.\,½]*)"|(LP)', " ".join(format.get("descriptions")))
if desc:
format_string += desc.group(1) or desc.group(2)
formats_dup.append({"name": format_string.replace(" ", "-"), "qty": int(format.get("qty") or "0")})
Expand Down

0 comments on commit f75af6e

Please sign in to comment.