NATION

PASSWORD

[Minor bug] Blank officer name possible with a space

Bug reports, general help, ideas for improvements, and questions about how things are meant to work.
User avatar
Merni
Ambassador
 
Posts: 1654
Founded: May 03, 2016
Democratic Socialists

[Minor bug] Blank officer name possible with a space

Postby Merni » Wed Nov 24, 2021 6:23 am

Normally, while appointing a Regional Officer using the "Custom" option to choose a custom title, you can't leave the title blank. If you try to do so, it fails to appoint the officer and shows an error.

But, if you enter a single space " " into the title field, the officer is appointed, but the title doesn't have any space and is completely empty. This is true in the Regional Control page after appointing the officer, in the Happenings line
8 minutes ago: Mernitest appointed Mernitest as with authority over Appearance in Mernitest.
9 minutes ago: Mernitest renamed the office held by Mernitest from "---" to "" in Mernitest.
as well as in the API dumps.

(I noticed this because while running a Python program that processes the region dump, I got an error since Python's XML ElementTree module returns blank element text as None, which is a different and incompatible type to a string. The nation that triggered the error was Coolio 100.)

Of course, this is a simple fix for my program, but I just wanted to note that it is a possible issue.
Donate your free time
The Labyrinth |
RIP Residency 3.5.16-18.11.21, killed by simplistic calculation | TGW Warden | GA Committee List
OOC by default | Admins: Please allow blocking WA TGs!
E -8.0 S -3.18
Wrote 532 GA
meth
I've noticed that everybody that is for abortion has already been born. — Ronald Reagan (eww)
When the people are being beaten with a stick, they are not much happier if it is called 'the People’s Stick.' — Mikhail Bakunin (to Karl Marx)
You're supposed to be employing the arts of diplomacy, not the ruddy great thumping sledgehammers of diplomacy. — Ardchoille
The West won the world not by the superiority of its ideas or values or religion [...] but rather by its superiority in applying organised violence. — Samuel P. Huntington (even he said that!)

Return to Technical

Who is online

Users browsing this forum: Erynia and Draconia, Northrop-Grumman, Sovishtia

Advertisement

Remove ads