Skip to content

Commit

Permalink
Added IS NULL mySql condition
Browse files Browse the repository at this point in the history
  • Loading branch information
fstagni committed Mar 22, 2021
1 parent a5b8cb6 commit 742cf7c
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/DIRAC/Core/Utilities/MySQL.py
Original file line number Diff line number Diff line change
Expand Up @@ -1117,10 +1117,15 @@ def buildCondition(self, condDict=None, older=None, newer=None,
attrName,
escapeInValue)
else:
condition = ' %s %s %s = %s' % (condition,
conjunction,
attrName,
escapeInValue)
if escapeInValue == 'NULL':
condition = ' %s %s %s IS NULL' % (condition,
conjunction,
attrName)
else:
condition = ' %s %s %s = %s' % (condition,
conjunction,
attrName,
escapeInValue)
conjunction = "AND"

if timeStamp:
Expand Down

0 comments on commit 742cf7c

Please sign in to comment.