Open ShanaLMoore opened 5 months ago
9 files ±0 9 suites ±0 16m 55s :stopwatch: -22s 4 762 tests ±0 4 699 :white_check_mark: +1 63 :zzz: ±0 0 :x: - 1 6 488 runs ±0 6 425 :white_check_mark: +1 63 :zzz: ±0 0 :x: - 1
Results for commit c3386ff3. ± Comparison against base commit 42eccf44.
looking at this closer, i definitely think we should do this refactor. it opens the whole class to extension in a way the type check strictly forecloses. if i can pass a type that ruby
URI()
will cast, i should be able to use it here.
I put this back in draft.
@no-reply Actually, I think the problem is here. It's forcing based_near to have a value even though we aren't declaring one. If we don't do this, based_near remains an empty [ ], and I no longer need this (or a similar) PR to avoid the error. Is there an issue with removing this line?
Without passing a string, we get an error when based_near is nil. This was discovered when testing Bulkrax in a valkyrized app. When we uploaded a CSV with no based_near defined, I was getting an error
*** ArgumentError Exception: g410220 is not a valid type
from the #extract_id method.based_near => [#<Valkyrie::ID:0x0000ffff5f734970 @id="g410220">]
This is because at this point, obj is a neither a string or a URI. It's a Valkyrie::ID.
@samvera/hyrax-code-reviewers