Skip to content

Commit

Permalink
feat(server): add x86_type to Build model
Browse files Browse the repository at this point in the history
Closes #303
  • Loading branch information
ericswpark committed Nov 23, 2023
1 parent 7a24d3b commit 6e61bf3
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
21 changes: 21 additions & 0 deletions server/core/migrations/0007_build_x86_type.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Generated by Django 4.2.7 on 2023-11-23 22:39

from django.db import migrations, models


class Migration(migrations.Migration):
dependencies = [
("core", "0006_mirrorserver_legacy_connection_mode"),
]

operations = [
migrations.AddField(
model_name="build",
name="x86_type",
field=models.TextField(
blank=True,
help_text="Type of x86 build. Do not set if the codename is not x86!",
max_length=10,
),
),
]
6 changes: 6 additions & 0 deletions server/core/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,12 @@ class Build(models.Model):

created = models.DateTimeField(auto_now_add=True, editable=False)

x86_type = models.TextField(
max_length=10,
help_text="Type of x86 build. Do not set if the codename is not x86!",
blank=True,
)

def get_upload_path(self, filename):
return "{}/{}".format(self.device.codename, filename)

Expand Down

0 comments on commit 6e61bf3

Please sign in to comment.