Skip to content

Commit

Permalink
Fix letter encoding (refs #432)
Browse files Browse the repository at this point in the history
  • Loading branch information
Almad committed Feb 25, 2024
1 parent 7544ae7 commit 5b317e9
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 3 deletions.
29 changes: 29 additions & 0 deletions ddcz/migrations/0131_letter_encoding_20240225_1412.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Generated by Django 2.0.13 on 2024-02-25 13:12

import ddcz.models.magic
from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('ddcz', '0130_runes_encoding_20230917_1920'),
]

operations = [
migrations.AlterField(
model_name='letter',
name='receiver',
field=ddcz.models.magic.MisencodedCharField(db_column='prijemce', max_length=25),
),
migrations.AlterField(
model_name='letter',
name='sender',
field=ddcz.models.magic.MisencodedCharField(db_column='odesilatel', max_length=25),
),
migrations.AlterField(
model_name='letter',
name='text',
field=ddcz.models.magic.MisencodedTextField(),
),
]
6 changes: 3 additions & 3 deletions ddcz/models/used/discussion.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,15 @@ class Meta:

class Letter(models.Model):
# TODO: Migrate those to have a profile_id relation, same as with Phorum posts etc.
sender = models.CharField(max_length=25, db_column="odesilatel")
receiver = models.CharField(max_length=25, db_column="prijemce")
sender = MisencodedCharField(max_length=25, db_column="odesilatel")
receiver = MisencodedCharField(max_length=25, db_column="prijemce")
# TODO: Make this enum for readability
# 3 = visible for both
# 2 = visible for receiver only
# 1 = visible for sender only
# 0 = deleted by both, should be pruned
visibility = models.CharField(max_length=1, db_column="viditelnost")
text = models.TextField()
text = MisencodedTextField()
date = models.DateTimeField(db_column="datum")

class Meta:
Expand Down

0 comments on commit 5b317e9

Please sign in to comment.