wbportfolio 1.55.5__py2.py3-none-any.whl → 1.55.7__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.

@@ -10,7 +10,7 @@ from django.db import models
10
10
  from wbcore.contrib.authentication.authentication import User
11
11
  from wbcore.contrib.currency.import_export.handlers import CurrencyImportHandler
12
12
  from wbcore.contrib.currency.models import Currency
13
- from wbcore.contrib.io.exceptions import DeserializationError
13
+ from wbcore.contrib.io.exceptions import DeserializationError, SkipImportError
14
14
  from wbcore.contrib.io.imports import ImportExportHandler
15
15
  from wbcore.contrib.notifications.dispatch import send_notification
16
16
  from wbfdm.import_export.handlers.instrument import InstrumentImportHandler
@@ -88,6 +88,9 @@ class AssetPositionImportHandler(ImportExportHandler):
88
88
  if not (value := data.get(field, None)) is None:
89
89
  data[field] = Decimal(value)
90
90
 
91
+ if data["weighting"] == 0:
92
+ raise SkipImportError("exclude position whose weight is 0")
93
+
91
94
  def _process_raw_data(self, data: Dict[str, Any]):
92
95
  if prices := data.get("prices", None):
93
96
  self.import_source.log += "Instrument Prices found: Importing"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wbportfolio
3
- Version: 1.55.5
3
+ Version: 1.55.7
4
4
  Author-email: Christopher Wittlinger <c.wittlinger@stainly.com>
5
5
  License-File: LICENSE
6
6
  Requires-Dist: cryptography==3.4.*
@@ -120,7 +120,7 @@ wbportfolio/import_export/backends/wbfdm/dividend.py,sha256=iAQXnYPXmtG_Jrc8THAJ
120
120
  wbportfolio/import_export/backends/wbfdm/mixin.py,sha256=JNtjgqGLson1nu_Chqb8MWyuiF3Ws8ox2vapxIRBYKE,400
121
121
  wbportfolio/import_export/handlers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
122
122
  wbportfolio/import_export/handlers/adjustment.py,sha256=6bdTIYFmc8_HFxcdwtnYwglMyCfAD8XrTIrEb2zWY0g,1757
123
- wbportfolio/import_export/handlers/asset_position.py,sha256=EWBmuZActTmBk4PJRjVRby-99g27LH6cWLbWve9N8GM,9000
123
+ wbportfolio/import_export/handlers/asset_position.py,sha256=LcJaHwxqoRWclBDOhaxTI7_MFqUXtUt99EJsV45ZqSo,9125
124
124
  wbportfolio/import_export/handlers/dividend.py,sha256=F0oLfNt2B_QQAjHBCRpxa5HSkfkAYdal_NjLJGtVckY,4408
125
125
  wbportfolio/import_export/handlers/fees.py,sha256=BOFHAvSTlvVLaxnm6KD_fcza1TlPc02HOR9J0_jjswI,2495
126
126
  wbportfolio/import_export/handlers/orders.py,sha256=GU3_tIy-tAw9aU-ifsnmMZPBB9sqfkFC_S1d9VziTwg,3136
@@ -567,7 +567,7 @@ wbportfolio/viewsets/transactions/claim.py,sha256=Pb1WftoO-w-ZSTbLRhmQubhy7hgd68
567
567
  wbportfolio/viewsets/transactions/fees.py,sha256=WT2bWWfgozz4_rpyTKX7dgBBTXD-gu0nlsd2Nk2Zh1Q,7028
568
568
  wbportfolio/viewsets/transactions/mixins.py,sha256=WipvJoi5hylkpD0y9VATe30WAcwIHUIroVkK10FYw7k,636
569
569
  wbportfolio/viewsets/transactions/trades.py,sha256=xBgOGaJ8aEg-2RxEJ4FDaBs4SGwuLasun3nhpis0WQY,12363
570
- wbportfolio-1.55.5.dist-info/METADATA,sha256=BSYTmVfS-XgxIctFW8n7654BngmPS2PnUP8UwhUZssg,751
571
- wbportfolio-1.55.5.dist-info/WHEEL,sha256=tkmg4JIqwd9H8mL30xA7crRmoStyCtGp0VWshokd1Jc,105
572
- wbportfolio-1.55.5.dist-info/licenses/LICENSE,sha256=jvfVH0SY8_YMHlsJHKe_OajiscQDz4lpTlqT6x24sVw,172
573
- wbportfolio-1.55.5.dist-info/RECORD,,
570
+ wbportfolio-1.55.7.dist-info/METADATA,sha256=9eoQ7L-xn-ibW7TppMry72I4MkZPJdB-mpICz2TiB5E,751
571
+ wbportfolio-1.55.7.dist-info/WHEEL,sha256=tkmg4JIqwd9H8mL30xA7crRmoStyCtGp0VWshokd1Jc,105
572
+ wbportfolio-1.55.7.dist-info/licenses/LICENSE,sha256=jvfVH0SY8_YMHlsJHKe_OajiscQDz4lpTlqT6x24sVw,172
573
+ wbportfolio-1.55.7.dist-info/RECORD,,