fixed null value in initial_data fixture and refactored card tempalte filter query