Skip to content

Commit 980ef8b

Browse files
authored
Merge pull request #961 from dfir-iris/api_v2_put_customer
Api v2 update customer
2 parents 823c86e + 20b074c commit 980ef8b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+682
-192
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,14 @@ jobs:
3131
uses: astral-sh/ruff-action@v3
3232
with:
3333
args: check --output-format=github
34-
- name: Check dependencies with import-linter
34+
- name: Check import dependencies with import-linter
3535
run: |
36-
python -m venv venv
37-
source venv/bin/activate
3836
pip install import-linter
3937
PYTHONPATH=source lint-imports
38+
- name: Looking for dead code with vulture
39+
run: |
40+
pip install vulture
41+
vulture
4042
4143
build-docker-db:
4244
name: Build docker db

.vulture.ignore

Lines changed: 455 additions & 0 deletions
Large diffs are not rendered by default.

pyproject.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
[tool.ruff.lint]
22
preview = true
3-
select = ["E101", "E225", "E23", "E24", "E3", "E4", "E7", "E9", "F", "PLR0402", "RET506", "TID252", "UP032", "W29"]
3+
select = ["ARG003", "ARG005", "B00", "E101", "E20", "E225", "E23", "E24", "E3", "E4", "E7", "E9", "F", "FURB142", "FURB145", "FURB148", "PLR0402", "RET506", "RUF029", "RUF100", "TID252", "UP032", "W29", "W391"]
44
ignore = ["E402", "E711", "E712", "E721", "E722"]
55

6+
[tool.vulture]
7+
paths = ["source/app", ".vulture.ignore"]
8+
ignore_decorators = ["@*.route", "@app.*", "@*.post", "@*.get", "@*.put", "@*.delete", "@pre_load", "@post_load"]
9+
610
[tool.importlinter]
711
root_package = "app"
812
include_external_packages = true

scripts/gunicorn-cfg.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,3 @@
2727

2828
def worker_exit(server, worker):
2929
sys.exit(4)
30-

source/app/alembic/versions/10a7616f3cc7_add_module_types.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,3 @@ def upgrade():
4242

4343
def downgrade():
4444
pass
45-

source/app/alembic/versions/ad4e0cd17597_add_ioctype_validation.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,4 +93,3 @@ def upgrade():
9393
def downgrade():
9494
op.drop_column('ioc_type', 'type_validation_regex')
9595
op.drop_column('ioc_type', 'type_validation_expect')
96-

source/app/alembic/versions/cd519d2d24df_password_policy_edition.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,3 @@ def upgrade():
5757

5858
def downgrade():
5959
pass
60-

source/app/alembic/versions/d5a720d1b99b_add_alerts_indexes.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,3 @@ def downgrade():
6161

6262
# Drop AlertSimilarity table
6363
op.drop_table('alert_similarity')
64-

source/app/blueprints/graphql/sliced_result.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,3 @@ def __getitem__(self, index: slice) -> any:
2929

3030
def __len__(self) -> int:
3131
return self._total
32-

source/app/blueprints/pages/manage/manage_customers_routes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def customer_edit_contact_modal(client_id, contact_id, caseid, url_redir):
9292
if url_redir:
9393
return redirect(url_for('manage_customers.manage_customers', cid=caseid))
9494

95-
contact = get_client_contact(client_id, contact_id)
95+
contact = get_client_contact(contact_id)
9696
if not contact:
9797
return response_error(f"Invalid Contact ID {contact_id}")
9898

0 commit comments

Comments
 (0)