Skip to content

Commit

Permalink
Print has_time_series in Base.show for components
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-thom committed May 8, 2024
1 parent cfdfb77 commit 47172fc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/utils/print.jl
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ function Base.show(io::IO, ::MIME"text/plain", ist::Component)
end
try
print(io, summary(ist), ":")
for (name, field_type) in zip(fieldnames(typeof(ist)), fieldtypes(typeof(ist)))
for name in fieldnames(typeof(ist))
obj = getproperty(ist, name)
getter_name = Symbol("get_$name")
if (obj isa InfrastructureSystemsInternal) && !default_units
Expand All @@ -201,6 +201,7 @@ function Base.show(io::IO, ::MIME"text/plain", ist::Component)
end
print(io, "\n ", name, ": ", val)
end
print(io, "\n ", "has_time_series", ": ", string(has_time_series(ist)))
finally
if default_units
set_units_setting!(ist, nothing)
Expand Down

0 comments on commit 47172fc

Please sign in to comment.