Skip to content

Commit

Permalink
Ensure ar-guid starts alpha (#651)
Browse files Browse the repository at this point in the history
* Ensure ar-guid starts with [a-f]

* Add a lower for good measure

---------

Co-authored-by: Michael Franklin <illusional@users.noreply.github.com>
  • Loading branch information
illusional and illusional committed Nov 7, 2023
1 parent 29b5555 commit f0e6093
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion server/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"""
import json
import os
import random
import uuid

import toml
Expand Down Expand Up @@ -38,7 +39,10 @@

def generate_ar_guid():
"""Generate guid for tracking analysis-runner jobs"""
return str(uuid.uuid4())
guid = str(uuid.uuid4())
if guid[0].isdigit():
guid = random.choice('abcdef') + guid[1:]
return guid.lower()


def get_server_config() -> dict:
Expand Down

0 comments on commit f0e6093

Please sign in to comment.