Skip to content

Commit d65d016

Browse files
[#2208457] small fixes
1 parent a99f7e7 commit d65d016

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

components/resc-backend/src/resc_backend/resc_web_service/crud/rule_tag.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def create_rule_tag(db_connection: Session, rule_id: int, tags: List[str]) -> Li
3131
)
3232
db_rule_tags.append(db_rule_tag)
3333

34-
if len(db_rule_tags) >= 1:
34+
if db_rule_tags:
3535
db_connection.add_all(db_rule_tags)
3636
db_connection.flush()
3737
db_connection.commit()
@@ -81,7 +81,7 @@ def create_tags(db_connection: Session, tags: List[str]) -> List[model.DBtag]:
8181
db_create_tag = model.DBtag(name=tag_name)
8282
db_create_tags.append(db_create_tag)
8383

84-
if len(db_create_tags) >= 1:
84+
if db_create_tags:
8585
db_connection.add_all(db_create_tags)
8686
db_connection.flush()
8787
db_connection.commit()

components/resc-backend/src/resc_backend/resc_web_service/endpoints/detailed_findings.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def get_all_detailed_findings(skip: int = Query(default=0, ge=0),
6161
- rule_names of type [String]
6262
6363
- rule_tags of type [String] findings in the result will have at least one of the specified tags
64-
for there rules
64+
for the rules
6565
6666
- project_name of type String
6767

0 commit comments

Comments
 (0)