[Answered ]-Handling a null header value

1👍

Please do not use is, unless you are sure that you need this. is checks if two expressions refer to the same object. But two strings can contain both 'null', but still can be different objects.

Therefore you thus perform string comparisons with:

if updated is None or updated == 'null':
    # …

Leave a comment