Skip to content

Commit

Permalink
Fix issue, default AR values not being applied to new channels
Browse files Browse the repository at this point in the history
  • Loading branch information
cryptosharks131 committed Jan 22, 2022
1 parent 532f9d1 commit 41d3acb
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
23 changes: 23 additions & 0 deletions gui/migrations/0019_auto_20220122_1009.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Generated by Django 3.2.7 on 2022-01-22 10:09

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('gui', '0018_auto_20220114_2218'),
]

operations = [
migrations.AlterField(
model_name='channels',
name='ar_amt_target',
field=models.BigIntegerField(),
),
migrations.AlterField(
model_name='channels',
name='ar_out_target',
field=models.IntegerField(),
),
]
4 changes: 2 additions & 2 deletions gui/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ class Channels(models.Model):
is_active = models.BooleanField()
is_open = models.BooleanField()
auto_rebalance = models.BooleanField(default=False)
ar_amt_target = models.BigIntegerField(default=100000)
ar_amt_target = models.BigIntegerField()
ar_in_target = models.IntegerField(default=100)
ar_out_target = models.IntegerField(default=75)
ar_out_target = models.IntegerField()

def save(self, *args, **kwargs):
if not self.ar_out_target:
Expand Down

0 comments on commit 41d3acb

Please sign in to comment.