wbportfolio 1.50.7__py2.py3-none-any.whl → 1.50.8__py2.py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of wbportfolio might be problematic. Click here for more details.

@@ -1,3 +1,6 @@
1
+ from contextlib import suppress
2
+
3
+ from django.core.exceptions import ObjectDoesNotExist
1
4
  from django.db import models
2
5
  from django.dispatch import receiver
3
6
  from wbfdm.models import Instrument, InstrumentType
@@ -6,10 +9,11 @@ from wbportfolio.models import InstrumentPortfolioThroughModel, Product, Product
6
9
 
7
10
 
8
11
  def _compute_str(instrument):
9
- if instrument.instrument_type == InstrumentType.PRODUCT_GROUP:
10
- return ProductGroup.objects.get(id=instrument.id).compute_str()
11
- elif instrument.instrument_type == InstrumentType.PRODUCT:
12
- return Product.objects.get(id=instrument.id).compute_str()
12
+ with suppress(ObjectDoesNotExist):
13
+ if instrument.instrument_type == InstrumentType.PRODUCT_GROUP:
14
+ return ProductGroup.objects.get(id=instrument.id).compute_str()
15
+ elif instrument.instrument_type == InstrumentType.PRODUCT:
16
+ return Product.objects.get(id=instrument.id).compute_str()
13
17
  return instrument.get_compute_str()
14
18
 
15
19
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wbportfolio
3
- Version: 1.50.7
3
+ Version: 1.50.8
4
4
  Author-email: Christopher Wittlinger <c.wittlinger@stainly.com>
5
5
  License-File: LICENSE
6
6
  Requires-Dist: cryptography==3.4.*
@@ -258,7 +258,7 @@ wbportfolio/models/product_groups.py,sha256=qoT8qv6tRdD6zmNDxsHO6dtnWw1-TRnyS5Nq
258
258
  wbportfolio/models/products.py,sha256=5z9OMLVS0ps6aOJbG3JE7gKTf3PlbC4rXIPpv55dD1A,22863
259
259
  wbportfolio/models/registers.py,sha256=qA6T33t4gxFYnabQFBMd90WGIr6wxxirDLKDFqjOfok,4667
260
260
  wbportfolio/models/roles.py,sha256=wF5Atp0xsJxDrYjmFw9XHgEOe_4C-lm4pppeYdymOrA,7343
261
- wbportfolio/models/signals.py,sha256=yDKg2ingDBFQY1oOFpDrMU2C2c0f2aIgRul5UEBqhIs,899
261
+ wbportfolio/models/signals.py,sha256=jZKC43nIqVdLapwo3getIMSqPUwbK5M36MmvA50jY24,1041
262
262
  wbportfolio/models/utils.py,sha256=iBdMjRCvr6aOL0nLgfSCWUKe0h39h3IGmUbYo6l9t6w,394
263
263
  wbportfolio/models/graphs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
264
264
  wbportfolio/models/graphs/portfolio.py,sha256=NwkehWvTcyTYrKO5ku3eNNaYLuBwuLdSbTEuugGuSIU,6541
@@ -522,7 +522,7 @@ wbportfolio/viewsets/transactions/rebalancing.py,sha256=6rIrdK0rtKL1afJ-tYfAGdQV
522
522
  wbportfolio/viewsets/transactions/trade_proposals.py,sha256=iQpC_Thbj56SmM05vPRsF1JZguGBDaTUH3I-_iCHCV0,5958
523
523
  wbportfolio/viewsets/transactions/trades.py,sha256=-yJ4j8NJTu2VWyhCq5BXGNND_925Ietoxx9k07SLVh0,21634
524
524
  wbportfolio/viewsets/transactions/transactions.py,sha256=ixDp-nsNA8t_A06rBCT19hOMJHy0iRmdz1XKdV1OwAs,4450
525
- wbportfolio-1.50.7.dist-info/METADATA,sha256=_3QdVIySIlzglfZnVOyVWrGDA7tv9HcUPA6Sy-iT4XY,702
526
- wbportfolio-1.50.7.dist-info/WHEEL,sha256=tkmg4JIqwd9H8mL30xA7crRmoStyCtGp0VWshokd1Jc,105
527
- wbportfolio-1.50.7.dist-info/licenses/LICENSE,sha256=jvfVH0SY8_YMHlsJHKe_OajiscQDz4lpTlqT6x24sVw,172
528
- wbportfolio-1.50.7.dist-info/RECORD,,
525
+ wbportfolio-1.50.8.dist-info/METADATA,sha256=_bjTGpvIzNplbgql4er5G9i6qI3wGDem6yS-5E51Kj4,702
526
+ wbportfolio-1.50.8.dist-info/WHEEL,sha256=tkmg4JIqwd9H8mL30xA7crRmoStyCtGp0VWshokd1Jc,105
527
+ wbportfolio-1.50.8.dist-info/licenses/LICENSE,sha256=jvfVH0SY8_YMHlsJHKe_OajiscQDz4lpTlqT6x24sVw,172
528
+ wbportfolio-1.50.8.dist-info/RECORD,,