2
2
import datetime as dt
3
3
import logging
4
4
from collections import defaultdict
5
- from collections .abc import Iterable
6
5
from datetime import datetime
7
- from typing import Protocol
6
+ from typing import Iterable , Protocol
8
7
9
8
from django .conf import settings
10
9
from django .contrib import messages
@@ -317,7 +316,7 @@ def get_second_status_preview(self, statustypen: list) -> StatusType | None:
317
316
# only 1 statustype for `self.case`
318
317
# (this scenario is blocked by openzaak, but not part of the zgw standard)
319
318
if len (statustype_numbers ) < 2 :
320
- logger .info (f "Case { self . case } has only one statustype" )
319
+ logger .info ("Case {case} has only one statustype" . format ( case = self . case ) )
321
320
return
322
321
323
322
statustype_numbers .sort ()
@@ -367,7 +366,9 @@ def sync_statuses_with_status_types(
367
366
# Workaround: OIP requests the current zaak.status individually and adds the retrieved information to the statustype mapping
368
367
369
368
logger .info (
370
- f"Issue #2037 -- Retrieving status individually for case { self .case .identification } because of eSuite"
369
+ "Issue #2037 -- Retrieving status individually for case {} because of eSuite" .format (
370
+ self .case .identification
371
+ )
371
372
)
372
373
self .case .status = zaken_client .fetch_single_status (self .case .status )
373
374
status_types_mapping [self .case .status .statustype ].append (self .case .status )
@@ -458,7 +459,9 @@ def is_file_upload_enabled_for_case_type(self) -> bool:
458
459
).exists ()
459
460
)
460
461
logger .info (
461
- f"Case { self .case .url } has case type file upload: { case_upload_enabled } "
462
+ "Case {url} has case type file upload: {case_upload_enabled}" .format (
463
+ url = self .case .url , case_upload_enabled = case_upload_enabled
464
+ )
462
465
)
463
466
return case_upload_enabled
464
467
@@ -471,18 +474,26 @@ def is_file_upload_enabled_for_statustype(self) -> bool:
471
474
except AttributeError as e :
472
475
logger .exception (e )
473
476
logger .info (
474
- f"Could not retrieve status type for case { self .case } ; "
475
- "the status has not been resolved to a ZGW model object."
477
+ "Could not retrieve status type for case {case}; "
478
+ "the status has not been resolved to a ZGW model object." .format (
479
+ case = self .case
480
+ )
476
481
)
477
482
return True
478
483
except KeyError as e :
479
484
logger .exception (e )
480
485
logger .info (
481
- f"Could not retrieve status type config for url { self .case .status .statustype .url } "
486
+ "Could not retrieve status type config for url {url}" .format (
487
+ url = self .case .status .statustype .url
488
+ )
482
489
)
483
490
return True
484
491
logger .info (
485
- f"Case { self .case .url } status type { self .case .status .statustype } has status type file upload: { enabled_for_status_type } "
492
+ "Case {url} status type {status_type} has status type file upload: {enabled_for_status_type}" .format (
493
+ url = self .case .url ,
494
+ status_type = self .case .status .statustype ,
495
+ enabled_for_status_type = enabled_for_status_type ,
496
+ )
486
497
)
487
498
return enabled_for_status_type
488
499
@@ -652,9 +663,7 @@ def get_case_document_files(
652
663
653
664
config = OpenZaakConfig .get_solo ()
654
665
documents = []
655
- for case_info_obj , info_obj in zip (
656
- case_info_objects , info_objects , strict = False
657
- ):
666
+ for case_info_obj , info_obj in zip (case_info_objects , info_objects ):
658
667
if not info_obj :
659
668
continue
660
669
if not is_info_object_visible (
0 commit comments