Kaynağa Gözat

tools: null keys and non-existent keys are the same thing

Daniele Bartolini 6 yıl önce
ebeveyn
işleme
2ab058008a
1 değiştirilmiş dosya ile 1 ekleme ve 4 silme
  1. 1 4
      tools/core/database.vala

+ 1 - 4
tools/core/database.vala

@@ -911,10 +911,7 @@ namespace Crown
 
 		public bool has_property(Guid id, string key)
 		{
-			assert(has_object(id));
-			assert(is_valid_key(key));
-
-			return get_data(id).has_key(key);
+			return get_property(id, key) != null;
 		}
 
 		public Value? get_property(Guid id, string key)