checks.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:zing 作者: evernote 项目源码 文件源码
def check_revision(app_configs=None, **kwargs):
    from pootle.core.models import Revision
    from pootle_store.models import Unit

    errors = []
    revision = Revision.get()
    try:
        max_revision = Unit.max_revision()
    except (OperationalError, ProgrammingError):
        return errors
    if revision is None or revision < max_revision:
        errors.append(checks.Critical(
            _("Revision is missing or has an incorrect value."),
            hint=_("Run `revision --restore` to reset the revision counter."),
            id="pootle.C016",
        ))

    return errors
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号