glideinWMS / glideinwms

The glideinWMS Project
http://tinyurl.com/glideinwms
Apache License 2.0
16 stars 45 forks source link

Ensure that credentials have absfname or generator attributes #336

Closed BrunoCoimbra closed 1 year ago

BrunoCoimbra commented 1 year ago

This PR prevents the reconfig and upgrade operations from accepting credentials without absfname or generator attributes. This is a temporary solution that will be deprecated when we finish refactoring the credentials class.

NOTE 1 The problem was caused by checking if pel["absfname"] is None instead of if not pel["absfname"]. There are other statements on the same function using the same syntax. We should consider updating them before merging this PR.

NOTE 2 The changes on this PR access if pel["absfname"].data directly. I don't like the idea of accessing the internals of a VOFrontendSubParams object directly, but this might be an acceptable solution while we refactor the credentials class. Feel free to suggest a better way to update the object for now.

mambelli commented 1 year ago

I added a local variable to avoid changing the value of the SubParam "absfname".