From 10d1209da89bd067031cab3d738c1ca7ddac01fc Mon Sep 17 00:00:00 2001 From: Maximilian Krambach Date: Wed, 30 Jan 2019 11:54:28 +0100 Subject: [PATCH] Fix 'errors' - two python comparisons error not passing flake8 anymore - typescript not being able to recognize an object, sending it prechewed --- .../motions/components/motion-detail/motion-detail.component.ts | 2 +- openslides/utils/migrations.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/app/site/motions/components/motion-detail/motion-detail.component.ts b/client/src/app/site/motions/components/motion-detail/motion-detail.component.ts index 16d27ff87..4320ca0ce 100644 --- a/client/src/app/site/motions/components/motion-detail/motion-detail.component.ts +++ b/client/src/app/site/motions/components/motion-detail/motion-detail.component.ts @@ -869,7 +869,7 @@ export class MotionDetailComponent extends BaseViewComponent implements OnInit { ) .subscribe(id => { this.contentForm.patchValue({ - workflow_id: parseInt(id, 10) + workflow_id: parseInt(id as string, 10) }); }); } diff --git a/openslides/utils/migrations.py b/openslides/utils/migrations.py index d4950e349..71ae61fb9 100644 --- a/openslides/utils/migrations.py +++ b/openslides/utils/migrations.py @@ -21,7 +21,7 @@ def add_permission_to_groups_based_on_existing_permission( codename=codename, content_type__in=content_type ) - if len(base_perm) is 1 and len(content_type) is 1: + if len(base_perm) == 1 and len(content_type) == 1: # get the actual content type and base permission base_perm = base_perm.get() content_type = content_type.get()