kolibri/core/logger/migrations/0004_tidy_progress_range.py
def tidy_progress_range(apps, schema_editor):
    """
    Tidies progress ranges because a bug had caused them to go out of range
    """
    ContentSessionLog = apps.get_model("logger", "ContentSessionLog")
    ContentSummaryLog = apps.get_model("logger", "ContentSummaryLog")

    # Not knowing how floating points will behave in the local database,
    # 1.0 might become bigger than 1.0!!
    ContentSessionLog.objects.filter(progress__lt=0).update(progress=0.0)
    ContentSummaryLog.objects.filter(progress__lt=0).update(progress=0.0)
    ContentSummaryLog.objects.filter(progress__gt=1).update(progress=1.0)

    Tidies progress ranges because a bug had caused them to go out of range
    
Tidies progress ranges because a bug had caused them to go out of range
Tidies progress ranges because a bug had caused them to go out of range
def tidy_progress_range(apps, schema_editor):
    ContentSessionLog = apps.get_model("logger", "ContentSessionLog")
    ContentSummaryLog = apps.get_model("logger", "ContentSummaryLog")
    ContentSessionLog.objects.filter(progress__lt=0).update(progress=0.0)
    ContentSummaryLog.objects.filter(progress__lt=0).update(progress=0.0)
    ContentSummaryLog.objects.filter(progress__gt=1).update(progress=1.0)
def tidy_progress_range ( apps , schema_editor ) : ContentSessionLog = apps . get_model ( "logger" , "ContentSessionLog" ) ContentSummaryLog = apps . get_model ( "logger" , "ContentSummaryLog" ) ContentSessionLog . objects . filter ( progress__lt = 0 ) . update ( progress = 0.0 ) ContentSummaryLog . objects . filter ( progress__lt = 0 ) . update ( progress = 0.0 ) ContentSummaryLog . objects . filter ( progress__gt = 1 ) . update ( progress = 1.0 )
Tidies progress ranges because a bug had caused them to go out of range
Tidies progress ranges because a bug had caused them to go out of range
"""
    Tidies progress ranges because a bug had caused them to go out of range
    """ # Not knowing how floating points will behave in the local database, # 1.0 might become bigger than 1.0!!
apps
schema_editor