wbfdm 1.54.1__py2.py3-none-any.whl → 1.54.3__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 wbfdm might be problematic. Click here for more details.

@@ -7,6 +7,14 @@ from wbfdm.contrib.metric.models import InstrumentMetric
7
7
  from .registry import backend_registry
8
8
 
9
9
 
10
+ def get_metrics_content_type(request, view):
11
+ return {
12
+ "id__in": list(
13
+ InstrumentMetric.objects.values_list("basket_content_type", flat=True).distinct("basket_content_type")
14
+ )
15
+ }
16
+
17
+
10
18
  class InstrumentMetricFilterSet(filters.FilterSet):
11
19
  parent_metric = filters.ModelChoiceFilter(
12
20
  label="Parent",
@@ -25,6 +33,7 @@ class InstrumentMetricFilterSet(filters.FilterSet):
25
33
  value_key="id",
26
34
  label_key="{{app_label}} | {{model}}",
27
35
  label=_("Basket Content Type"),
36
+ filter_params=get_metrics_content_type,
28
37
  )
29
38
 
30
39
  class Meta:
@@ -5,6 +5,7 @@ from typing import Callable
5
5
 
6
6
  import pytz
7
7
  from django.conf import settings
8
+ from django.core.exceptions import ObjectDoesNotExist
8
9
  from django.db import IntegrityError, connections
9
10
  from django.db.models import Max, QuerySet
10
11
  from django.template.loader import get_template
@@ -258,7 +259,10 @@ def update_or_create_item(
258
259
  _save_single_instrument(instrument)
259
260
  return instrument
260
261
 
261
- except InvalidMove:
262
+ except (
263
+ InvalidMove,
264
+ ObjectDoesNotExist,
265
+ ): # we might encounter a object does not exist error in case the inserted parent does not exist yet in our db which might happen if it was just deleted because invalid
262
266
  logger.warning(
263
267
  f"We encountered a MPTT ill-formed node for source ID {external_id}. Rebuilding the tree might be necessary."
264
268
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wbfdm
3
- Version: 1.54.1
3
+ Version: 1.54.3
4
4
  Summary: The workbench module ensures rapid access to diverse financial data (market, fundamental, forecasts, ESG), with features for storing instruments, classifying them, and conducting financial analysis.
5
5
  Author-email: Christopher Wittlinger <c.wittlinger@stainly.com>
6
6
  Requires-Dist: roman==4.*
@@ -49,7 +49,7 @@ wbfdm/contrib/metric/dispatch.py,sha256=io6p4EJf36OdnxZDTw-sRRKfr_q8TLYvIDGWCkb3
49
49
  wbfdm/contrib/metric/dto.py,sha256=vS93tUvfusWdE7gUJsp320GwfwWpb8bGJDdrb1GB6M8,3413
50
50
  wbfdm/contrib/metric/exceptions.py,sha256=6IuEVde7aOyQaXHE817bCNdUw8LTI3sOSU9LiV3NZbM,200
51
51
  wbfdm/contrib/metric/factories.py,sha256=b6-3fSERbZGjGw6QC0k3hhSpyQKVy2MJoZzX4y3GPEo,1123
52
- wbfdm/contrib/metric/filters.py,sha256=a6TAN-_EaRUhJ34JCFwFmEgj8uKZMNXFLOoMS2qvwZI,1427
52
+ wbfdm/contrib/metric/filters.py,sha256=TBFnA2gWuJU_QE5BPvpnBU4SVAsUemM__gSeUvmHQxQ,1690
53
53
  wbfdm/contrib/metric/models.py,sha256=lI_ZmK7058GT_5ngC45UdXRc7ju-ULbcOtO5w_CMBwU,7002
54
54
  wbfdm/contrib/metric/orchestrators.py,sha256=YyVVKKm3Sl1zVr2mw9A7LSJs6YnmElbg1yESREF3lFk,3736
55
55
  wbfdm/contrib/metric/registry.py,sha256=SdZff6FIrtdbyAO0X0BpXndJAIhU6VVojNui_MEw7jI,3167
@@ -115,7 +115,7 @@ wbfdm/contrib/qa/jinja2/qa/sql/ibes/estimates.sql,sha256=OWgeogSFj7-OdXvJTvNsThN
115
115
  wbfdm/contrib/qa/jinja2/qa/sql/ibes/financials.sql,sha256=0jXNMdX8ixVRJ8YyvtoJRQ510pHFYEioMy7NTp5ecck,2582
116
116
  wbfdm/contrib/qa/sync/exchanges.py,sha256=XU7dj-rQzMlDku9lnmAACaTRoxx8pFSyr5kCK79cYAc,3124
117
117
  wbfdm/contrib/qa/sync/instruments.py,sha256=8aTQVJ_cw1phe4FWikn79pjCfUijaTcwkdhQCtSXKH0,3156
118
- wbfdm/contrib/qa/sync/utils.py,sha256=8bJoKrTqosOofVLu5fBtHTLw4df86wgD2illJeUmbZM,11516
118
+ wbfdm/contrib/qa/sync/utils.py,sha256=LUnjNR28moT92cjP04SVCRQ_Ssp6SaO9kehgWV4zvOs,11782
119
119
  wbfdm/dataloaders/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
120
120
  wbfdm/dataloaders/cache.py,sha256=K9BeVxT7p-BMvjurINt18bfrUDccp840uIjfDBLJRNk,4841
121
121
  wbfdm/dataloaders/protocols.py,sha256=xFbexmhh38MWmkWsOSsfcNxdtrrWfO02qNihsqwA_BQ,2987
@@ -359,6 +359,6 @@ wbfdm/viewsets/statements/__init__.py,sha256=odxtFYUDICPmz8WCE3nx93EvKZLSPBEI4d7
359
359
  wbfdm/viewsets/statements/statements.py,sha256=gA6RCI8-B__JwjEb6OZxpn8Y-9aF-YQ3HIQ7e1vfJMw,4304
360
360
  wbfdm/viewsets/technical_analysis/__init__.py,sha256=qtCIBg0uSiZeJq_1tEQFilnorMBkMe6uCMfqar6-cLE,77
361
361
  wbfdm/viewsets/technical_analysis/monthly_performances.py,sha256=O1j8CGfOranL74LqVvcf7jERaDIboEJZiBf_AbbVDQ8,3974
362
- wbfdm-1.54.1.dist-info/METADATA,sha256=AhEOtElwwzXVh9dlxDAr4FSjswp3dUFwgrldP5FvKT8,768
363
- wbfdm-1.54.1.dist-info/WHEEL,sha256=tkmg4JIqwd9H8mL30xA7crRmoStyCtGp0VWshokd1Jc,105
364
- wbfdm-1.54.1.dist-info/RECORD,,
362
+ wbfdm-1.54.3.dist-info/METADATA,sha256=Va66JevcnIknLO3xjCAkgUOT1xMUYsw2A9plYI3aZOE,768
363
+ wbfdm-1.54.3.dist-info/WHEEL,sha256=tkmg4JIqwd9H8mL30xA7crRmoStyCtGp0VWshokd1Jc,105
364
+ wbfdm-1.54.3.dist-info/RECORD,,
File without changes