summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pyisda/credit_index.pyx6
1 files changed, 3 insertions, 3 deletions
diff --git a/pyisda/credit_index.pyx b/pyisda/credit_index.pyx
index dbb9a6d..16e83dc 100644
--- a/pyisda/credit_index.pyx
+++ b/pyisda/credit_index.pyx
@@ -57,12 +57,12 @@ cdef class CurveList:
size_t n = len(curves)
double w
- w, sc = curves[0]
-
if value_date is not None:
self.base_date = pydate_to_TDate(value_date)
else:
- self.base_date = sc._thisptr.get().fBaseDate
+ if len(curves) >= 1:
+ w, sc = curves[0]
+ self.base_date = sc._thisptr.get().fBaseDate
i = 0
cdef int n_skipped = 0