mirror of
https://github.com/Theodor-Springmann-Stiftung/kgpz_web.git
synced 2025-10-29 09:05:30 +00:00
Small comment changes
This commit is contained in:
@@ -189,33 +189,3 @@ func (p Piece) ReferencesWork(id string) (*WorkRef, bool) {
|
||||
}
|
||||
return nil, false
|
||||
}
|
||||
|
||||
// TODO: We can make this fast depending on which category to look for
|
||||
// but we'll have to define rules for every single category (~35 of them)
|
||||
func (p Piece) IsCat(k string) bool {
|
||||
for _, c := range p.CategoryRefs {
|
||||
if c.Category == k {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
for _, c := range p.WorkRefs {
|
||||
if c.Category == k {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
for _, c := range p.AgentRefs {
|
||||
if c.Category == k {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
for _, c := range p.PieceRefs {
|
||||
if c.Category == k {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user