Skip to content

Unability to freeze the website if no runs have calendar #10

Open

Description

@hroncok

No run with times (can happen):

Error: Nothing frozen for endpoints course_calendar_ics. Did you forget a URL generator?

No run at all (unlikely):

Error: Nothing frozen for endpoints course_calendar, course_calendar_ics. Did you forget a URL generator?

How do we get rid ourselves form this error? We can filter MissingURLGeneratorWarning, but only some.

Activity

  1. hroncok commented on Sep 26, 2018

    @hroncok
    MemberAuthor

    czechitas-ostrava-jaro is still in master and has calendar. once removed, this will hit me.

  2. hroncok commented on Sep 26, 2018

    @hroncok
    MemberAuthor

    @mikicz can this be solved in NaucseFreezer? Do you have some elegant idea?

  3. mikicz commented on Sep 26, 2018

    @mikicz
    Member

    Well, I have a solution, IDK if it's ideal. You can override the _check_endpoints method of the Freezer class to do nothing and the problem goes away, it works even without the czechitas-ostrava-jaro run...

    I also tried to use warnings.simplefilter to filter out the warning and it didn't help...

  4. hroncok commented on Sep 26, 2018

    @hroncok
    MemberAuthor

    Can we copy paste it and remove specific endpoints from the check?

    Maybe we can send PR to Frozen-Flask to do this in a more flexible fashion?

  5. mikicz commented on Sep 27, 2018

    @mikicz
    Member

    Yes, quite easily, you just need to add one line to the function...

    not_generated_endpoints -= {'course_calendar_ics', 'course_calendar'}
    

    A PR for flexible solution would of course be better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions