Use correct black version
This commit is contained in:
parent
601e014326
commit
88b7212465
|
|
@ -4,5 +4,4 @@ from vbv_lernwelt.course_session_group.models import CourseSessionGroup
|
|||
|
||||
|
||||
@admin.register(CourseSessionGroup)
|
||||
class CourseSessionAssignmentAdmin(admin.ModelAdmin):
|
||||
...
|
||||
class CourseSessionAssignmentAdmin(admin.ModelAdmin): ...
|
||||
|
|
|
|||
|
|
@ -153,9 +153,9 @@ def fetch_course_session_all_users(courses: List[int], excluded_domains=None):
|
|||
|
||||
def generate_export_response(cs_users: List[User]) -> HttpResponse:
|
||||
response = HttpResponse(content_type="text/csv; charset=utf-8")
|
||||
response[
|
||||
"Content-Disposition"
|
||||
] = f"attachment; filename=edoniq_user_export_{date.today().strftime('%Y%m%d')}.csv"
|
||||
response["Content-Disposition"] = (
|
||||
f"attachment; filename=edoniq_user_export_{date.today().strftime('%Y%m%d')}.csv"
|
||||
)
|
||||
|
||||
response.write("\ufeff".encode("utf8")) # UTF-8 BOM
|
||||
|
||||
|
|
|
|||
|
|
@ -125,9 +125,9 @@ def _handle_feedback_export_action(course_seesions, file_name):
|
|||
response = HttpResponse(
|
||||
content_type="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
||||
)
|
||||
response[
|
||||
"Content-Disposition"
|
||||
] = f"attachment; filename={make_export_filename(file_name)}"
|
||||
response["Content-Disposition"] = (
|
||||
f"attachment; filename={make_export_filename(file_name)}"
|
||||
)
|
||||
response.write(excel_bytes)
|
||||
|
||||
return response
|
||||
|
|
|
|||
|
|
@ -65,9 +65,9 @@ class TestNotificationService(TestCase):
|
|||
self.assertFalse(notification.emailed)
|
||||
|
||||
def test_send_notification_with_email(self):
|
||||
self.recipient.additional_json_data[
|
||||
"email_notification_categories"
|
||||
] = json.dumps(["USER_INTERACTION"])
|
||||
self.recipient.additional_json_data["email_notification_categories"] = (
|
||||
json.dumps(["USER_INTERACTION"])
|
||||
)
|
||||
self.recipient.save()
|
||||
|
||||
verb = "Anne hat deinen Auftrag bewertet"
|
||||
|
|
@ -146,9 +146,9 @@ class TestNotificationService(TestCase):
|
|||
self.assertFalse(notification.emailed)
|
||||
|
||||
# when the email was not sent, yet it will still send it afterwards...
|
||||
self.recipient.additional_json_data[
|
||||
"email_notification_categories"
|
||||
] = json.dumps(["USER_INTERACTION"])
|
||||
self.recipient.additional_json_data["email_notification_categories"] = (
|
||||
json.dumps(["USER_INTERACTION"])
|
||||
)
|
||||
self.recipient.save()
|
||||
|
||||
result = self.notification_service._send_notification(
|
||||
|
|
@ -188,9 +188,9 @@ class TestNotificationService(TestCase):
|
|||
self.assertFalse(self._has_sent_emails())
|
||||
|
||||
# Assert mail is sent if corresponding email notification type is enabled
|
||||
self.recipient.additional_json_data[
|
||||
"email_notification_categories"
|
||||
] = json.dumps(["USER_INTERACTION"])
|
||||
self.recipient.additional_json_data["email_notification_categories"] = (
|
||||
json.dumps(["USER_INTERACTION"])
|
||||
)
|
||||
self.recipient.save()
|
||||
self.notification_service._send_notification(
|
||||
sender=self.sender,
|
||||
|
|
|
|||
|
|
@ -39,9 +39,9 @@ class SelfEvaluationFeedbackSerializer(serializers.ModelSerializer):
|
|||
return obj.learning_unit.get_circle().title
|
||||
|
||||
def get_criteria(self, obj):
|
||||
performance_criteria: List[
|
||||
PerformanceCriteria
|
||||
] = obj.learning_unit.performancecriteria_set.all()
|
||||
performance_criteria: List[PerformanceCriteria] = (
|
||||
obj.learning_unit.performancecriteria_set.all()
|
||||
)
|
||||
|
||||
criteria = []
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue