-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Testing improvements for snovault and indirectly for cgap #241
base: master
Are you sure you want to change the base?
Conversation
# which was an object that was always less than any other version than itself. | ||
# We don't care about negative versions, so let's just say that parse_version | ||
# for our purposes can return version 0. | ||
return raw_parse_version(version_string or '0') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I fussed a bit about whether to default this to '-9999'
, '0'
, or '1'
, but I think we never use negative versions and '0'
is therefore the lower bound. And I wanted a way to distinguish between this default and the earliest version I thought was likely to be specified explicitly, which is probably '1'
.
cached = _sid_cache(request) | ||
found_sid = cached.get(linked['uuid']) | ||
if not found_sid: | ||
db_res = request.registry[STORAGE].write.get_by_uuid(linked['uuid']) | ||
if db_res: | ||
request._sid_cache[linked['uuid']] = db_res.sid | ||
found_sid = request._sid_cache.get(linked['uuid']) | ||
cached[linked['uuid']] = found_sid = db_res.sid |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed the logic here so please double-check carefully, but I think this way of expressing what found_sid is will be easier to read.
No description provided.