Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
zkayyali812 committed Jan 15, 2025
1 parent f754a8a commit 6861a5e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 0 additions & 2 deletions src/aap_eda/api/serializers/decision_environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

from urllib.parse import urlparse

from rest_framework import serializers

from aap_eda.api.serializers.eda_credential import EdaCredentialRefSerializer
Expand Down
6 changes: 3 additions & 3 deletions src/aap_eda/core/validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ def check_if_de_valid(image_url: str, eda_credential_id: int):
)

if eda_credential_id != -1:

credential = get_credential_if_exists(eda_credential_id)
inputs = yaml.safe_load(credential.inputs.get_secret_value())
credential_host = inputs.get("host")
Expand All @@ -145,8 +144,9 @@ def check_if_de_valid(image_url: str, eda_credential_id: int):
)

# Check that the host matches the credential host.
# For backward compatibility when creating a new DE with an old credential
# we need to separate any scheme from the host before doing the compare.
# For backward compatibility when creating a new DE with
# an old credential we need to separate any
# scheme from the host before doing the compare.
parsed_credential_host = urllib.parse.urlparse(credential_host)
# If there's a netloc that's the host to use; if not, it's the path if
# there is no scheme else it's the scheme and path joined by a colon.
Expand Down

0 comments on commit 6861a5e

Please sign in to comment.