Menu

#119 Make Variant errors out when Parent number is non-numeric

closed-fixed
5
2009-09-28
2009-09-18
Ahasuerus
No

When the user enters a non-numeric string in the "Parent #:" field of the Make Variant screen, a Python error occur. Here is the error when you enter "1902/9":

<type 'exceptions.ValueError'> Python 2.5.4: C:\usr\bin\python.exe
Thu Sep 17 22:33:46 2009

A problem occurred in a Python script. Here is the sequence of function calls leading up to the error, in the order they occurred.
C:\Program Files\Apache Software Foundation\Apache2.2\cgi-bin\edit\submitmkvar1.cgi in ()
50 sys.exit(0)
51
52 if int(title_id) == int(parent_id):
53 print '<div id="WarningBox">'
54 print "<h3>Error: Title record can not be a variant to itself.</h3>"
builtin int = <type 'int'>, title_id = '995914', parent_id = '1902/9'

<type 'exceptions.ValueError'>: invalid literal for int() with base 10: '1902/9'
args = ("invalid literal for int() with base 10: '1902/9'",)
message = "invalid literal for int() with base 10: '1902/9'"

Discussion

  • Ahasuerus

    Ahasuerus - 2009-09-27

    Fixed in edit/submitmkvar1.py 1.6

     
  • Ahasuerus

    Ahasuerus - 2009-09-27
    • assigned_to: nobody --> ahasuerus_isfdb
    • status: open --> open-fixed
     
  • Ahasuerus

    Ahasuerus - 2009-09-28

    Implemented in r2009-37.

     
  • Ahasuerus

    Ahasuerus - 2009-09-28
    • status: open-fixed --> closed-fixed
     

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB