fix: declaring self.data after calling self.token (#10634)

This commit is contained in:
Teddy 2023-03-16 17:28:02 +01:00 committed by GitHub
parent fadefff3e1
commit 9d858ede3a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -52,12 +52,12 @@ class NifiClient:
self.password = password
if all(setting for setting in [self.username, self.password]):
self.data = f"username={self.username}&password={self.password}"
self.verify = verify
self.headers = {
"Authorization": f"Bearer {self.token}",
**self.content_headers,
}
self.data = f"username={self.username}&password={self.password}"
self.client_cert = None
else:
self.data = None