Skip to content

FIX: Make default argument immutable

Thomas Michelat requested to merge immutableDefault into main

I think this may be one cause of the issues you experienced.

the channel default argument is mutable and passed into a subclass. If the subclass modifies the content of the channel list and you then make a new Model object the content of the default argument will be modified.

tl;dr Never use mutable objects as default argument

@danilo

Edited by Thomas Michelat

Merge request reports