Commit 04ec1902 authored by Guillaume Risbourg's avatar Guillaume Risbourg Committed by hydrargyrum
Browse files

[bp] get_params search for sub id instead of label

The search on the select with label was causing some issue when there
was some extra space in the middle of the label. Changed it to search
for the full id in the `value` attribute.

Closes: 34974@sibi
parent 333493a4
......@@ -525,7 +525,7 @@ def iter_subscriptions(self):
def iter_documents(self, subscription):
params =
params =
for year in
params['formulaire.anneeRecherche'] = year
......@@ -40,6 +40,7 @@ class item(ItemElement):
klass = Subscription
obj_id = Regexp(Attr('.', 'value'), r'\w-(\w+)')
obj__full_id = CleanText('./@value')
obj_label = CleanText('.')
obj_subscriber = Env('subscriber')
......@@ -79,9 +80,9 @@ def obj_date(self):
def get_params(self, sub_label):
def get_params(self, sub_full_id):
# the id is in the label
sub_value = Attr('//select[@id="compte"]/option[contains(text(), "%s")]' % sub_label, 'value')(self.doc)
sub_value = Attr('//select[@id="compte"]/option[contains(@value, "%s")]' % sub_full_id, 'value')(self.doc)
form = self.get_form(name='formulaireHistorique')
form['formulaire.numeroCompteRecherche'] = sub_value
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment