From 8cbcc741b4660a60e47f96dbb7e800966d7eaf0b Mon Sep 17 00:00:00 2001
From: Ernesto Rico Schmidt <ernesto@helsinki.at>
Date: Wed, 3 Jul 2024 15:44:27 -0400
Subject: [PATCH] feat: update codes & readable names

---
 ...ter_show_options_alter_timeslot_options.py | 55 +++++++++++++++++++
 program/models.py                             |  4 +-
 2 files changed, 57 insertions(+), 2 deletions(-)
 create mode 100644 program/migrations/0107_alter_show_options_alter_timeslot_options.py

diff --git a/program/migrations/0107_alter_show_options_alter_timeslot_options.py b/program/migrations/0107_alter_show_options_alter_timeslot_options.py
new file mode 100644
index 00000000..35982470
--- /dev/null
+++ b/program/migrations/0107_alter_show_options_alter_timeslot_options.py
@@ -0,0 +1,55 @@
+# Generated by Django 4.2.13 on 2024-07-03 19:42
+
+from django.db import migrations
+
+
+class Migration(migrations.Migration):
+
+    dependencies = [
+        ("program", "0106_alter_schedule_options"),
+    ]
+
+    operations = [
+        migrations.AlterModelOptions(
+            name="show",
+            options={
+                "ordering": ("slug",),
+                "permissions": [
+                    ("display__show__internal_note", "Can display internal note field"),
+                    ("edit__show__categories", "Can edit category field"),
+                    ("edit__show__cba_series_id", "Can edit cba series id field"),
+                    ("edit__show__default_playlist_id", "Can edit default media source"),
+                    ("edit__show__description", "Can edit description field"),
+                    ("edit__show__email", "Can edit email field"),
+                    ("edit__show__funding_categories", "Can edit funding category field"),
+                    ("edit__show__hosts", "Can edit hosts field"),
+                    ("edit__show__image", "Can edit image field"),
+                    ("edit__show__internal_note", "Can edit internal note field"),
+                    ("edit__show__is_active", "Can edit is active field"),
+                    ("edit__show__languages", "Can edit language field"),
+                    ("edit__show__links", "Can edit links field"),
+                    ("edit__show__logo", "Can edit logo field"),
+                    ("edit__show__music_focuses", "Can edit music focus field"),
+                    ("edit__show__name", "Can edit name field"),
+                    ("edit__show__owners", "Can edit owners field"),
+                    ("edit__show__predecessor", "Can edit predecessor field"),
+                    ("edit__show__short_description", "Can edit short description field"),
+                    ("edit__show__slug", "Can edit slug field"),
+                    ("edit__show__topics", "Can edit topic field"),
+                    ("edit__show__type", "Can edit type field"),
+                    ("update_show", "Can update show"),
+                ],
+            },
+        ),
+        migrations.AlterModelOptions(
+            name="timeslot",
+            options={
+                "ordering": ("start", "end"),
+                "permissions": [
+                    ("edit__timeslot__memo", "Can edit memo field"),
+                    ("edit__timeslot__playlist_id", "Can edit media source"),
+                    ("edit__timeslot__repetition_of", "Can edit repetition of field"),
+                ],
+            },
+        ),
+    ]
diff --git a/program/models.py b/program/models.py
index 158046e9..ae0d6c32 100644
--- a/program/models.py
+++ b/program/models.py
@@ -274,7 +274,7 @@ class Show(models.Model):
             ("display__show__internal_note", "Can display internal note field"),
             ("edit__show__categories", "Can edit category field"),
             ("edit__show__cba_series_id", "Can edit cba series id field"),
-            ("edit__show__default_playlist", "Can edit default playlist field"),
+            ("edit__show__default_playlist_id", "Can edit default media source"),
             ("edit__show__description", "Can edit description field"),
             ("edit__show__email", "Can edit email field"),
             ("edit__show__funding_categories", "Can edit funding category field"),
@@ -452,7 +452,7 @@ class TimeSlot(models.Model):
         ordering = ("start", "end")
         permissions = [
             ("edit__timeslot__memo", "Can edit memo field"),
-            ("edit__timeslot__playlist", "Can edit playlist field"),
+            ("edit__timeslot__playlist_id", "Can edit media source"),
             ("edit__timeslot__repetition_of", "Can edit repetition of field"),
         ]
 
-- 
GitLab