ausocean / cloud

GNU General Public License v3.0
1 stars 1 forks source link

bench: cron page should give error for crons added with the same ID #168

Open trekhopton opened 4 days ago

trekhopton commented 4 days ago

Currently it seems that if we add a cron with the same name (ID) as another cron, it will just silently overwrite the existing cron. Instead it should give an error, something like "cron IDs must be unique".

scruzin commented 4 days ago

Do you mean that you tried to add a new cron with the same name as an existing cron, even though all the existing crons for a site are displayed right above, i.e., on the same page?

image

If so, it feels like operator error to me. We can of course defend against it, though.

trekhopton commented 4 days ago

Yes, this was brought to my attention by Breeze. I don't think it's particularly obvious that the names must be unique, so while it is operator error, it would be more user friendly to show an error message.

scruzin commented 4 days ago

The convention is that anything that is called "ID" must be unique. If it is called "Name" (such as a device name) it need not be unique. Perhaps the docs need to be clearer, though.