-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added platform check #783
Added platform check #783
Conversation
pylint output
|
Do I need to fix syntax in the same pull request? |
alws/crud/errata.py
Outdated
@@ -140,6 +140,10 @@ async def get_oval_xml( | |||
select(models.Platform).where(models.Platform.name == platform_name) | |||
) | |||
platform: models.Platform = platform.scalars().first() | |||
|
|||
if platform is None: | |||
return None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if not platform:
return
alws/routers/errata.py
Outdated
@@ -61,7 +61,13 @@ async def get_oval_xml( | |||
only_released: bool = False, | |||
db: AsyncSession = Depends(get_db), | |||
): | |||
return await errata_crud.get_oval_xml(db, platform_name, only_released) | |||
records = await errata_crud.get_oval_xml(db, platform_name, only_released) | |||
if records is None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here, we can also have if not records
Yes |
1a6e098
to
0185d45
Compare
Code Coverage Summary
Linter reportsPylint report
Black report
Bandit report
View full reports on the Job Summary page. |
Resolves: AlmaLinux/build-system#213