Skip to content

Commit 1d1184a

Browse files
committed
fix bug so code still works if curve_status column is missing
1 parent 7d99036 commit 1d1184a

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

lmfdb/bianchi_modular_forms/web_BMF.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -264,23 +264,23 @@ def conv(ap):
264264
if self.ec_status not in [0,-1]: # so it is +1 (curve does exist) or None (curve_status not set)
265265
self.ec_url = url_for("ecnf.show_ecnf_isoclass", nf=self.field_label, conductor_label=self.level_label, class_label=self.label_suffix)
266266
curve_bc = db.ec_nfcurves.lucky({'class_label':self.label}, projection="base_change")
267+
self.bc_forms = []
267268
if curve_bc is not None:
268269
self.ec_status = 1 # curve does exist in ec_nfcurves, now see if it is base-change
269270
curve_bc = [lab for lab in curve_bc if '?' not in lab]
270271
if curve_bc and "." not in curve_bc[0]:
271272
curve_bc = [cremona_label_to_lmfdb_label(lab) for lab in curve_bc]
272273
curve_bc_parts = [split_lmfdb_label(lab) for lab in curve_bc]
273-
bc_urls = [url_for("cmf.by_url_newform_label", level=cond, weight=2, char_orbit_label='a', hecke_orbit=iso) for cond, iso, num in curve_bc_parts]
274+
bc_urls = [url_for("cmf.by_url_newform_label", level=cond, weight=2, char_orbit_label='a', hecke_orbit=iso)
275+
for cond, iso, num in curve_bc_parts]
274276
bc_labels = [".".join( [str(cond), str(2), 'a', iso] ) for cond,iso,_ in curve_bc_parts]
275277
bc_exists = [db.mf_newforms.label_exists(lab) for lab in bc_labels]
276278
self.bc_forms = [{'exists':ex, 'label':lab, 'url':url} for ex,lab,url in zip(bc_exists, bc_labels, bc_urls)]
277-
else: # ec_status is 0 or -1, we have no matching curve
278-
self.bc_forms = []
279-
if self.ec_status is None:
280-
if self.bct or self.label in bmfs_with_no_curve:
281-
self.ec_status = -1 # there is certainly no curve
282-
else:
283-
self.ec_status = 0 # there should be a curve but we do not have one
279+
if self.ec_status is None:
280+
if self.bct or self.label in bmfs_with_no_curve:
281+
self.ec_status = -1 # there is certainly no curve
282+
else:
283+
self.ec_status = 0 # there should be a curve but we do not have one
284284

285285
self.properties.append(('Sign', self.sign))
286286
self.properties.append(('Analytic rank', self.anrank))

0 commit comments

Comments
 (0)