Browse Source

[Trivial] Assign value after the encode

In the previous fix [1] the value of pubkey.encode() was
forgotten to be assigned which basically makes it a noop
operation. This patch fixes that.

[1] https://review.opendev.org/c/osf/refstack/+/776168

Change-Id: I93a4e5d8afde7e3abfdcf66220c64cda111d4a48
changes/05/777705/1
Martin Kopec 5 months ago
parent
commit
0074bf3b70
  1. 2
      refstack/api/validators.py

2
refstack/api/validators.py

@ -128,7 +128,7 @@ class TestResultValidator(BaseValidator):
try:
pubkey = request.headers.get('X-Public-Key', '')
try:
pubkey.encode('utf-8')
pubkey = pubkey.encode('utf-8')
except AttributeError:
# it's already in bytes
pass

Loading…
Cancel
Save