Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jan 15, 2024
1 parent 400dcc0 commit 2517d82
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 12 deletions.
9 changes: 4 additions & 5 deletions voxpop/migrations/0008_alter_voxpop_allow_anonymous.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,14 @@


class Migration(migrations.Migration):

dependencies = [
('voxpop', '0007_message_channel_name'),
("voxpop", "0007_message_channel_name"),
]

operations = [
migrations.AlterField(
model_name='voxpop',
name='allow_anonymous',
field=models.BooleanField(default=True, verbose_name='allow anonymous'),
model_name="voxpop",
name="allow_anonymous",
field=models.BooleanField(default=True, verbose_name="allow anonymous"),
),
]
4 changes: 2 additions & 2 deletions voxpop/signals.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@ def notify_question_state_changed(sender, instance, *args, **kwargs):
@receiver(post_save, sender=Question)
def notify_question_created(sender, instance, created, **kwargs):
if created:
channel_name = get_notify_channel_name(voxpop_id=instance.voxpop_id)
channel_name = get_notify_channel_name(voxpop_id=instance.voxpop_id)
payload = {
"uuid": str(instance.uuid),
"text": str(instance.text),
"display_name": str(instance.display_name),
"created_at": str(instance.created_at),
"created_at": str(instance.created_at),
}
message = create_message(
voxpop_id=instance.voxpop_id,
Expand Down
2 changes: 1 addition & 1 deletion voxpop/static/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
clone.querySelector("div[data-voxpop-question-uuid]").setAttribute("data-voxpop-question-uuid", question.uuid);
clone.querySelector("blockquote").innerText = question.text;
clone.querySelector(".displayName").innerText = question.display_name;

// Format time.
const datetime = new Date(question.created_at);
const formattedTime = datetime.toLocaleTimeString("da", {
Expand Down
2 changes: 1 addition & 1 deletion voxpop/static/thumbs-up.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion voxpop/static/voxpop.css
Original file line number Diff line number Diff line change
Expand Up @@ -120,4 +120,4 @@ div[data-voxpop-uuid] form > .info {
background-color: #d4edda;
border: 1px solid #c3e6cb;
padding: 0.3em 0.5em;
}
}
4 changes: 2 additions & 2 deletions voxpop/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def admin_voxpop(request, voxpop_id: UUID = None):
state=Question.State.DISCARDED,
),
},
"idp": voxpop.organisation.idp
"idp": voxpop.organisation.idp,
}
return render(request, "voxpop/admin/voxpop.html", context)
return render(request, "voxpop/admin/auth_error.html")
Expand Down Expand Up @@ -180,7 +180,7 @@ def index(request):
if voxpop:
context = {
"voxpop": voxpop,
"idp": voxpop.organisation.idp
"idp": voxpop.organisation.idp,
}
return render(request, "voxpop/index.html", context)

Expand Down

0 comments on commit 2517d82

Please sign in to comment.