Skip to content

Commit cb8759f

Browse files
committed
Define val for the locals()
The variable `%(val)` in the msg has not been defined. Signed-off-by: Chin Yeung Li <[email protected]>
1 parent be605b2 commit cb8759f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/attributecode/model.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,7 @@ def _validate(self, *args, **kwargs):
328328
for url in self.value:
329329
if not self.is_valid_url(url):
330330
name = self.name
331+
val = self.value
331332
msg = (u'Field %(name)s: Invalid URL: %(val)s' % locals())
332333
errors.append(Error(WARNING, msg))
333334
return errors

0 commit comments

Comments
 (0)