Erry Kostala
Erry Kostala
Hello @benjaoming , we are also hitting this issue. What do we need in order to get this PR merged? Do you want me to write a test case since...
@benjaoming Can you help here? I'm trying to run the tests even against `main` with `make test` and I get the following ``` Traceback (most recent call last): File "/home/erry/django-money/setup.py",...
@benjaoming I'm not sure where to push but here is a test that fails in `main`. ``` class TestMinValueSerializer: def test_serializer_validators(self): from djmoney.contrib.django_rest_framework import MoneyField class MinValueSerializer(serializers.Serializer): field = MoneyField(...
The failure: ``` self = cleaned = Decimal('-10.00') def get_limit_value(self, cleaned): if isinstance(self.limit_value, Money): if cleaned.currency.code != self.limit_value.currency.code: return return self.limit_value elif isinstance(self.limit_value, (int, Decimal)): return self.limit_value try: > return...
@benjaoming Digging further, the other thing I'm missing here is `default_currency`. If I give it explicitly in the serializer, this test passes even against `main`. However, that should not be...
@benjaoming here is a test that fails on main, but works on this branch ``` class TestMinValueSerializer: def test_serializer_validators(self): from djmoney.contrib.django_rest_framework import MoneyField class MinValueSerializer(serializers.Serializer): money = MoneyField(decimal_places=2, max_digits=10, min_value=0)...
@benjaoming I see you did not add the latest version sorry :'0
@benjaoming the thing is that @hosamhamdy258 's fix works if there's a `currency` in the `model` you're including, which `BaseModel` has but the vanilla thing doesn't 😁 Maybe there'sa a...
@benjaoming if you want to enforce that behaviour maybe it would be good to have an actual error message rather than just let the code die with a cryptic message.....
Can someone create a VR port? It wouldn't be "real" 3D but it'd give much better immersion