Skip to content

Commit

Permalink
fix conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
thelostone-mc committed Feb 17, 2022
2 parents 212c45a + 4e1a775 commit d8683d8
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 2 deletions.
1 change: 1 addition & 0 deletions app/inbox/signals.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

from app.utils import get_profiles_from_text
from dashboard.models import Activity
from html import escape
from inbox.utils import (
comment_notification, mentioned_users_notification, send_mention_notification_to_users, send_notification_to_user,
)
Expand Down
27 changes: 26 additions & 1 deletion app/quadraticlands/migrations/0001_initial.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,31 @@
from django.db import migrations, models
import django.db.models.deletion
import quadraticlands.models
from django.utils.translation import gettext_lazy as _


class Uint256Field(models.DecimalField):
description = _("Ethereum uint256 number")
'''
Field to store ethereum uint256 values. Uses Decimal db type without decimals to store
in the database, but retrieve as `int` instead of `Decimal` (https://docs.python.org/3/library/decimal.html)
https://github.com/gnosis/gnosis-py/blob/master/gnosis/eth/django/models.py
'''
def __init__(self, *args, **kwargs):
kwargs['max_digits'] = 79 # 2 ** 256 is 78 digits
kwargs['decimal_places'] = 0
super().__init__(*args, **kwargs)

def deconstruct(self):
name, path, args, kwargs = super().deconstruct()
del kwargs['max_digits']
del kwargs['decimal_places']
return name, path, args, kwargs

def from_db_value(self, value, expression, connection):
if value is None:
return value
return int(value)


class Migration(migrations.Migration):
Expand Down Expand Up @@ -40,7 +65,7 @@ class Migration(migrations.Migration):
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('created_on', models.DateTimeField(auto_now=True)),
('claim_total', quadraticlands.models.Uint256Field(default=0)),
('claim_total', Uint256Field(default=0)),
('distribution', django.contrib.postgres.fields.jsonb.JSONField(default=dict)),
('profile', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='initial_distribution', to='dashboard.Profile')),
],
Expand Down
1 change: 0 additions & 1 deletion app/retail/templates/bounties/contributor.html
Original file line number Diff line number Diff line change
Expand Up @@ -133,5 +133,4 @@ <h2 class="join-gitcoin-heading">{% trans "<span class=\"light\">All that's left
fetchBountiesAndAddToList(uri, '.featured-bounties', 5, additional_callback);
</script>
{% endif %}
<script src="https://codefund.app/properties/189/funder.js" async="async"></script>
</html>

0 comments on commit d8683d8

Please sign in to comment.