Commit 9a4ffaf2 authored by Grégor JOUET's avatar Grégor JOUET 🔧
Browse files

Added recup ids for new items

parent 88236a2d
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -332,11 +332,14 @@ def add_new_request():
            status.HTTP_404_NOT_FOUND,
        )

    recup = "".join([random.choice(string.ascii_letters + string.digits) for n in range(5)]).upper()

    req = PrintRequest.create(
        title=data["title"],
        description=data["description"],
        author=current_user,
        project=data["project"],
        recup_id=recup
    )
    log.info(
        "Created print request '%s' by user %s (%s)"