I have the following code:
class Permit {
public VehicleHistory Vehicles {get...}
}
class VehicleHistory : IEnumerable<PermitVehicle> {
public IEnumerable<Vehicle> Approved {get...}
}
record PermitVehicle {
public required Vehicle Value { get; init; }
public required ApprovalStatus Status { get; init; }
}
And now, passing an instance of Permit to a template like {% for vehicle in Permit.Vehicles.Approved %} {{ vehicle.Value.Plate }} {% endfor %} renders nothing. It seems that fluid detects that Vehicles is an IEnumerable and stop trying to get the next property. Of course iterating over Vehicles works, but that makes me replicate the same code I have in Approved into the template.
Not sure if this is by design, or a problem in the template system.
I have the following code:
And now, passing an instance of Permit to a template like
{% for vehicle in Permit.Vehicles.Approved %} {{ vehicle.Value.Plate }} {% endfor %}renders nothing. It seems that fluid detects thatVehiclesis an IEnumerable and stop trying to get the next property. Of course iterating over Vehicles works, but that makes me replicate the same code I have inApprovedinto the template.Not sure if this is by design, or a problem in the template system.